DB support for downloading and uploading attachments