use attachments for file; fix add vs edit