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

Improve file download on nuxeo api

    XMLWordPrintable

    Details

    • Type: User story
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.9.3
    • Component/s: Rest API
    • Tags:
    • Backlog priority:
      850
    • Impact type:
      API change
    • Upgrade notes:
      Hide

      JsonDocumentWriter#writeDocument(JsonGenerator jg, DocumentModel doc, String[] schemas, Map<String, String> contextParameters,
      HttpHeaders headers) does not exist anymore it is replaced by :

      JsonDocumentWriter#writeDocument(JsonGenerator jg, DocumentModel doc, String[] schemas, Map<String, String> contextParameters,
      HttpHeaders headers, HttpServletRequest request)

      The generated JSON also changes and now includes a full URL to get the blob data :

      • Before :
      "file:content": {
                  "name": "Nuxeo_Platform_5.8_administration_documentation.pdf",
                  "mime-type": "application/pdf",
                  "encoding": null,
                  "digest": "4faa1208dbd8dce54db9174dabdec7db",
                  "length": "11485973",
                  "data": "files/80438e3b-48bb-42d1-9e08-9a0f54b8f945?path=%2Fcontent"
              },
      
      • Now
      "file:content": {
                  "name": "Meetup Docker.pdf",
                  "mime-type": "application/pdf",
                  "encoding": null,
                  "digest": "f829ff57c289b60be5dd2c57adcf1d51",
                  "length": "5980167",
                  "data": "http://localhost:8080/nuxeo/nxbigfile/default/e596bd67-aaa5-4a43-a84c-bcf4850c4834/file%3Acontent"
              },
      
      Show
      JsonDocumentWriter#writeDocument(JsonGenerator jg, DocumentModel doc, String[] schemas, Map<String, String> contextParameters, HttpHeaders headers) does not exist anymore it is replaced by : JsonDocumentWriter#writeDocument(JsonGenerator jg, DocumentModel doc, String[] schemas, Map<String, String> contextParameters, HttpHeaders headers, HttpServletRequest request) The generated JSON also changes and now includes a full URL to get the blob data : Before : "file:content" : { "name" : "Nuxeo_Platform_5.8_administration_documentation.pdf" , "mime-type" : "application/pdf" , "encoding" : null , "digest" : "4faa1208dbd8dce54db9174dabdec7db" , "length" : "11485973" , "data" : "files/80438e3b-48bb-42d1-9e08-9a0f54b8f945?path=%2Fcontent" }, Now "file:content" : { "name" : "Meetup Docker.pdf" , "mime-type" : "application/pdf" , "encoding" : null , "digest" : "f829ff57c289b60be5dd2c57adcf1d51" , "length" : "5980167" , "data" : "http: //localhost:8080/nuxeo/nxbigfile/ default /e596bd67-aaa5-4a43-a84c-bcf4850c4834/file%3Acontent" },
    • Sprint:
      Sprint 9
    • Story Points:
      2

      Description

      When a document has a blob property, the json description should provide a ready to use URL , that targets the big file servlet.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: