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

Blob url for thumbnails malformed in JSON output

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.4
    • Fix Version/s: 7.10-HF09, 8.3
    • Component/s: Core IO, Rest API
    • Upgrade notes:
      Hide

      7.10-HF08 -> 7.10-HF09 or 8.3+
      The URL of blobs as found in JSON output when querying nuxeo/api/v1/id/myDocumentId has been fixed regarding the prefix of the property. For example for a thumbnail it was ending with:
      /thumbnail:thumb:thumbnail/retrievedFile.png
      now it has been fixed to:
      /thumb:thumbnail/retrievedFile.png
      You should upgrade your code if it was parsing that kind of URL.

      Show
      7.10-HF08 -> 7.10-HF09 or 8.3+ The URL of blobs as found in JSON output when querying nuxeo/api/v1/id/myDocumentId has been fixed regarding the prefix of the property. For example for a thumbnail it was ending with: /thumbnail:thumb:thumbnail/retrievedFile.png now it has been fixed to: /thumb:thumbnail/retrievedFile.png You should upgrade your code if it was parsing that kind of URL.
    • Sprint:
      NOS-5, NOS-17

      Description

      For the REST API: http://localhost:8080/nuxeo/api/v1/id/ + document Id
      With HTTP header: X-NXProperties: *

      The url to a thumbnail comes out looking like

              "thumb:thumbnail": {
                  "data": "http://localhost:8080/nuxeo/nxfile/default/3530d4eb-ff8d-42f8-938f-2bc67421c6a6/thumbnail:thumb:thumbnail/Africa_and_Europe_from_a_Million_Miles_Away.png",
                  "digest": "12e84fd637b652c54dda2533e2456287",
                  "digestAlgorithm": "MD5",
                  "encoding": null,
                  "length": "178250",
                  "mime-type": "image/png",
                  "name": "Africa_and_Europe_from_a_Million_Miles_Away.png"
              },
      

      If one debugs at https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core-io/src/main/java/org/nuxeo/ecm/core/io/marshallers/json/document/DocumentPropertyJsonWriter.java#L199 it is apparent that the BlobProperty name for file:content is content, but for thumb:thumbnail it is thumb:thumbnail.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 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

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.