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

Blob properties JSON serialization should include a real download url

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 5.9.3
    • Component/s: Automation

      Description

      When sending a DocumentModel over the wire the default JSON serialization will convert the Blob properties to a map.

      For example :

      { 
        name: "somefile.txt", 
        data: "files/74498e6d-0562-4c66-bb35-04f8d75efc17?path=%2Fcontent",  
        length: 5, 
        encoding: null, 
        digest: "a2e4822a98337283e39f7b60acf85ec9", 
        mime-type: "text/plain"
      }
      

      There are at least 2 problems :

      • the download link is not what we want
        • it binds to a WebEngine resource that we don't want to advertise as a download end point
      • the JSON does not include a the repository name
        • processing the Blob JSON representation to wrap as a lazy downloadable stream is a pain since the property can not be handled separately from the Document

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: