Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-18186

Fix attachments display when using REST API upload endpoint

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.4
    • Fix Version/s: 7.10-HF02, 8.1
    • Component/s: Seam / JSF UI
    • Tags:
    • Sprint:
      drive-7.10-3, drive-8.1-1
    • Story Points:
      1

      Description

      Using the REST API:

      • Create a batch

      curl -u Administrator:Administrator -X POST 'http://localhost:8080/nuxeo/api/v1/upload'

      • Upload a file and 2 attachments in a batch

      curl -u Administrator:Administrator -H 'X-File-Name: BeyondSpaceTravelAgency-RatePlan.docx' -H 'Content-Type: application/octet-stream' -F file=@/path/to/BeyondSpaceTravelAgency-RatePlan.docx -X POST 'http://localhost:8080/nuxeo/api/v1/upload/yourBatchIdHere/0'

      ...

      • Bind files to a new document

      curl -u Administrator:Administrator -H 'Content-Type: application/json' -X POST 'http://localhost:8080/nuxeo/api/v1/path/default-domain/workspaces/Contracts/EMEA' -d '{ "entity-type" : "document", "type": "BCContract", "name": "beyond-space-agency", "properties" : { "dc:title": "Beyond Space Travel Agency", "dc:description": "Travel to the infinite and beyond in first class ufos.", "bccontract:startDate": "2015-06-01", "bccontract:endDate": "2016-06-30", "bccontract:contractOwner": "Sarah", "bccontract:customer": [

      {"firstName": "Chuck", "name": "Norris", "birthDate": "1968-10-14"}

      ], "bcsalescommon:amount": "99750", "file:content":

      { "upload-batch": "yourBatchIdHere", "upload-fileId": "0" }

      , "files:files" : [ { "file" :

      { "upload-batch": "yourBatchIdHere", "upload-fileId": "1" }

      }, { "file" :

      { "upload-batch": "yourBatchIdHere", "upload-fileId": "2" }

      } ] } }'

      => Document is created and files are attached
      => BUT going to the files tab, empty names appear

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: