Added support for uploading attachments