https://doc.nuxeo.com/nxdoc/howto-upload-file-nuxeo-using-rest-api/
recommends to use curl command like:
curl -u Administrator:Administrator -H "X-File-Name:myFile.doc" -H "X-File-Type:application/msword" -F file=@myFile.doc http://NUXEO_SERVER/nuxeo/api/v1/upload/<myBatchId>/0
The -F file=@myFile.doc turns the upload into a multipart upload which is slow on big file, (need to reencode the file, need multiple copies server side)
Instead we should use -XPOST -T myFile.doc so the upload much faster.
Note that the curl --data-binaries works also but load the file into memory so it shouldn't be used either.
Of course we need to check that it works on all the example of the page.
- is related to
-
NXP-24384 multipart/form-data file upload with zero copy
- Resolved