Hacky integration of attachment and image upload

Works, but is pretty ugly. Will refactor.

Also updated docs