Uploaded image for project: 'Nuxeo Documentation'
  1. Nuxeo Documentation
  2. NXDOC-1508

Update the curl command to upload blob so it is not done in multipart encoding

    XMLWordPrintable

    Details

    • Tags:
    • Sprint:
      nxfit 10.1.6
    • Story Points:
      1

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h

                    PagerDuty