You are currently browsing legacy 3.0 version of documentation. Click here to switch to the newest 5.0 version.
GetAttachment can be used to download a single attachment.
@Deprecated public Attachment getAttachment(String key);
|key||String||key of the attachment you want to download|
|Attachment||Object that represents attachment.|
Attachment attachment = store.getDatabaseCommands().getAttachment("albums/holidays/sea.jpg"); // null if does not exist
GetAttachments can be used to download attachment information for multiple attachments.
@Deprecated public AttachmentInformation getAttachments(int start, Etag startEtag, int pageSize);
|start||int||Indicates how many attachments should be skipped|
|startEtag||Etag||ETag from which to start|
|batchSize||int||maximum number of attachments that will be downloaded|
|AttachmentInformation||Object that represents attachment metadata information.|
AttachmentInformation attachments = store.getDatabaseCommands().getAttachments(0, Etag.empty(), 10);