-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.2.0, 2.4.0, 3.0.0-SNAPSHOT
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
- Define a document type with a multivalued complex field with 2 subfields:
- fichier: Blob
- name: String
- Deploy to Nuxeo
- Create a document with this type and set 2 values for the complex field
- Edit the document and remove the blob for the first element of the complex field. Save
- 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.
- depends on
-
NXP-25598 Do not remove attachments from Document when ignore Blob property in PUT requests
- Resolved
- is related to
-
NXS-5379 Fix missing readonly mode on nuxeo-file when generating layouts for multi property
- Resolved
-
NXP-27074 nuxeo-file widget -- can't delete Blob from document
- Resolved
- split from
-
NXP-27371 Fix multivalued complex field update when a blob is removed from a subfield
- Resolved
- Is referenced in