Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-980

Fix nuxeo-file widget in data-table editing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0, 2.4.0, 3.0.0-SNAPSHOT
    • Fix Version/s: 2.4.11, 3.0.0
    • Component/s: UI, Upload
    • Release Notes Summary:
      Removing a blob from a multi-valued complex field works.
    • Tags:
    • Backlog priority:
      700
    • Sprint:
      nxGang Sprint 11.1.12, nxGang Sprint 11.1.13
    • Story Points:
      3

      Description

      Context

      Since NXP-27371, the PUT on /nuxeo/api/v1/id now handles blob removal.

      But it seems that our WebUI doesn't send to the server the right information.

      Reproduction case

      Steps to reproduce

      1. Define a document type with a multivalued complex field with 2 subfields:
        • fichier: Blob
        • name: String
      2. Deploy to Nuxeo
      3. Create a document with this type and set 2 values for the complex field
      4. Edit the document and remove the blob for the first element of the complex field. Save
      5. Observe the document was not updated
        The corresponding payload for the request is almost empty
        {
        	"entity-type": "document",
        	"uid": "7ff88b98-4263-4927-9cd7-2a85cb1fa748",
        	"properties": {}
        }
        

      Technical solution

      In previous context the PUT request should be:

      {
      	"entity-type": "document",
      	"uid": "7ff88b98-4263-4927-9cd7-2a85cb1fa748",
      	"properties": {
      		"complexmulti:complexe": [{
      			"fichier": null,
      			"name": "fichier7"
      		}, {
      			"fichier": {
      				"name": "SimpleTable.xlsx",
      				"mime-type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      				"encoding": null,
      				"digestAlgorithm": "MD5",
      				"digest": "cfb77b8e91627e7c5006e75ce9b8dc20",
      				"length": "6056",
      				"data": "http://localhost:8080/nuxeo/nxfile/default/7ff88b98-4263-4927-9cd7-2a85cb1fa748/complexmulti:complexe/0/fichier/SimpleTable.xlsx?changeToken=13-0",
      				"appLinks": []
      			},
      			"name": "fichier2"
      		}]
      	}
      }
      

      Note: NXP-25598, allowing this fix, just requires the data property of blob.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 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 day, 1 hour, 15 minutes
                  1d 1h 15m