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

REST API POST to create Picture + file does not trigger the creation of the views

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 7.10-HF17, 8.3, 8.4-SNAPSHOT
    • Fix Version/s: 7.10-HF18, 8.10
    • Component/s: Rest API

      Description

      Tested agains 8?3 and SNAPSHOT (nuxeo-cap-8.4-I20160914_2325-tomcat)

      in a server where CORS is enabled, use the API Playground to:
      1. Upload an image
      2. Send a POST request using the path, and create a Picture document that references the batch. Something like:
      POST /api/v1/path/default-domain/workspaces/ws/folder
      With body:

      {
        "entity-type": "document",
        "type": "Picture",
        "name": "My Picture",
        "properties": {
          "dc:title": "My Picture",
      	"file:content": {"upload-batch":"batchId-8c8803b3-c4d6-470c-9d2b-de7ffd212690","upload-fileId":"0"}
        }
      }
      

      he result is OK and no error is triggered. file:content does contain the file which can be downloaded. But picture:views stays empty, the views (and thus the thumbnail) are not generated.

      Also, it is impossible to access the document from the JSF UI, it triggers an error starting with

      2016-09-15 17:04:07,826 ERROR [http-bio-0.0.0.0-8080-exec-17] [org.nuxeo.ecm.platform.actions.DefaultActionFilter] evaluation of condition #{previewActions.hasPreview} failed: returning false
      javax.el.ELException: Error reading 'hasPreview' on type org.nuxeo.ecm.platform.preview.seam.PreviewActionBean_$$_javassist_seam_51
      
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

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