Remove createAttachment after review

Move attachment copying out of database transaction
and into new PreparedAttachment constructor