LiquidFiles Documentation
LiquidFiles Documentation
Updated v3.7

Upload Message Attachments

This article covers uploading files (attachments) to a message with the preferred method which is to use the binary upload method — the same method as the LiquidFiles web interface and all the LiquidFiles plugins like the Outlook plugin, Mac/IOS app and so on.

The basic minimal functionality is as follows:

Request Info
Info Value
Request URL /message/attachments/upload
Request Parameters
Parameter Type Description
filename String The filename of the uploaded file.
content_type String (Optional) LiquidFiles first use the Content-Type HTTP header if that's set (see the example below). If the Content-Type header is not set it will use this optional parameter. If neither are set, the Content-Type will be detected using the Linux `file` command.
chunks Integer (Optional) When uploading files in chunks (in pieces), these are the total number of pieces there is. Please see the Chunks article for documentation how to use chunks.
chunk Integer (Optional and required when chunks is set) When uploading files in chunks, this is the current chunk number, with the first chunk being chunk number 0 (zero).

Please see the Attachment Attributes documentiation for a description of the Response Parameters.

Example Using curl

The Response has been formatted for readability (added indendation and linebreaks).

curl -X POST --user "ojubiigauS2TxTy4ovk6Ph:x" \
   -H "Accept: application/json" \
   -H "Content-Type: image/gif" \
   --data-binary "@someimage.gif" \

    "size_human":"44.3 KB"