Attachments Information
An Attachment in LiquidFiles is the object that contains a file and that can be attached to one or more Secure Messages or FileLinks.
Creating the Attachment is covered in the Attachment Upload documentation.
Deleting Attachments is covered in the Delete Attachments documentation.
Attachment Parameters
When listing, viewing or creating an attachment, the API will respond with one or many attachments. Each attachment object will have the following response parameters.
Parameter | Type | Description |
---|---|---|
id | String | The Attachment ID |
filename | String | The Attachment Filename |
size | Integer | Exact File Size in Bytes |
size_human | String | Approximate, human friendly, file size (11.2 MB, 23.3 KB, ...) |
content_type | String | The Content-Type |
checksum | String | SHA-256 Checksum |
crc32 | String | CRC32 Checksum |
assembled | Boolean | True if the attachment has been assembled or not (when uploading multiple chunks) |
virus_scan_required | Boolean | True if the attachment is required to be Virus Scanned. |
virus_scanned | Boolean | True if the attachment has been Virus Scanned. |
virus_scanned_at | DateTime | When the Virus Scanner last scanned this attachment. |
content_blocked | Boolean | True if the attachment has been blocked (by the Virus Scanner or ActionScript). |
content_blocked_message | String | If the attachment has been blocked, this will display the reason. |
actionscript | String | If the attachment needs to be scanned by an ActionScript Upload script, this will list the name of that script. |
actionscript_scanned | Boolean | True if the ActionScript scan has been performed. |
actionscript_scanned_at | DateTime | When the ActionScript was executed. |
processed | Boolean | True when the attachment has completed all required Assembly, Checksum, Virus and ActionScript scanning. |
processed_at | DateTime | When the Attachment completed all required processing. |
available | Boolean | True if the file is available for download or not. Please note that this is user context sensitive. If the user is an Admin or if a file is required to be virus scanned and you have a setting in Admin → Configuration → Settings that Local Users can download files that are not virus scanned, then if the current user is a local user, this available will be true regardless if the virus_scan has completed or not. For external users or if Local Users are not permitted to download files that haven't been virus scanned, this will be false unless the virus scan has completed with no virus detected. |
expires_at | DateTime | When the Attachment has been attached to at least one Message or FileLink, this is when the last Message or FileLink expires. |
created_at | DateTime | When the Attachment was created. |
messages | Array | The Message ID of any messages that the attachment is attached to. |
filelinks | Array | The FileLink ID of any FileLinks that the attachment is attached to. |
Listing Attachments
You can use this API to list a users available attachments, expired or deleted attachments will not be visible.
Info | Value |
---|---|
Request URL | /attachments |
Request VERB | GET |
Example using curl
curl --user "ojubiigauS2TxTy4ovk6Ph:x" -H "Content-Type: application/json" https://liquidfiles.company.com/attachments {"attachments": [ { "id":"8mop0J8KXRa93DasEdTdiJ", "filename":"quod.odp", "size":3132812, "content_type":"video/quicktime", "checksum":"5a9a8cb868a53679b9e28d06523cdd6580044560a98401da9b81c8314056dccc", "crc32":"44b411", "assembled":true, "virus_scan_required":true, "virus_scanned":true, "virus_scanned_at":"2019-12-10T00:41:23.300Z", "actionscript":null, "actionscript_scanned_at":null, "actionscript_scanned":false, "content_blocked":false, "content_blocked_message":null, "processed":true, "processed_at":"2019-12-10T00:41:23.300Z", "expires_at":"2020-01-09", "created_at":"2019-12-10T00:41:22.000Z", "available":true, "size_human":"2.99 MB", "messages":["ctunaJMapLydXlG694MsAA"], "filelinks":[] }, { "id":"lCJtYIlEeHjTsQiQrz2QFv", "filename":"soluta.pages", "size":4658246, "content_type":"audio/vnd.wave", "checksum":"7a26202ea49d5296bb932c9c16bb707e26d6c1362996d9acd9e2dca59e464e1b", "crc32":"5424bd", "assembled":true, "virus_scan_required":true, "virus_scanned":true, "virus_scanned_at":"2019-12-10T00:41:23.300Z", "actionscript":null, "actionscript_scanned_at":null, "actionscript_scanned":false, "content_blocked":false, "content_blocked_message":null, "processed":true, "processed_at":"2019-12-10T00:41:23.300Z", "expires_at":"2020-01-09", "created_at":"2019-12-10T00:41:22.000Z", "available":true, "size_human":"4.44 MB", "messages":["ctunaJMapLydXlG694MsAA"], "filelinks":[] } ] }
Show Attachment
You can view an individual attachments with this API call.
Info | Value |
---|---|
Request URL | /attachments/_attachment_id_ |
Request VERB | GET |
Example using curl
curl --user "ojubiigauS2TxTy4ovk6Ph:x" -H "Content-Type: application/json" https://liquidfiles.company.com/attachments/8mop0J8KXRa93DasEdTdiJ {"attachment": { "id":"8mop0J8KXRa93DasEdTdiJ", "filename":"quod.odp", "size":3132812, "content_type":"video/quicktime", "checksum":"5a9a8cb868a53679b9e28d06523cdd6580044560a98401da9b81c8314056dccc", "crc32":"44b411", "assembled":true, "virus_scan_required":true, "virus_scanned":true, "virus_scanned_at":"2019-12-10T00:41:23.300Z", "actionscript":null, "actionscript_scanned_at":null, "actionscript_scanned":false, "content_blocked":false, "content_blocked_message":null, "processed":true, "processed_at":"2019-12-10T00:41:23.300Z", "expires_at":"2020-01-09", "created_at":"2019-12-10T00:41:22.000Z", "available":true, "size_human":"2.99 MB", "messages":["ctunaJMapLydXlG694MsAA"], "filelinks":[] } }