Skip to main content
View as Markdown

File upload

This method allows uploading a file. The file is sent as multipart/form-data, using the file field.

On success, the hash of the uploaded file (externalFileHash) is returned, which is later used to attach the file to transfer documents (the AttachmentIds field).

Allowed extensions: docx, docm, dotx, dotm, docb, xls, xlsb, xlsm, xlsx, jpg, jpeg, png, ppt, gif, txt, pdf, zip, rar, tar, gzip, ico, dat, csv, xml, enc, svg.

For a disallowed extension or a missing file, the HTTP status code 400 Bad Request is returned with the message File extension is not allowed.

Parameters​

filerequiredfile

The file to upload. Sent via the file field of the multipart/form-data form.

POST api/files/upload
Content-Type: multipart/form-data
file: (binary)

Returned parameters​

externalFileHashstring

A unique hash of the uploaded file. Used in the AttachmentIds field when creating a transfer document.

"sample string 1"