-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 2022.7.3
-
Fix Version/s: None
-
Component/s: Studio Modeler
Steps to reproduce:
- define a document type with a schema named "file_schema" which has a multivalued Blob property
- generate the code for this property in the View layout of this document
<div role="widget"> <label>Attachments</label> <nuxeo-document-attachments document="{{document}}" xpath="file_schema:attachments" name="attachments"></nuxeo-document-attachments> </div>
- deploy the Studio project
- create a document of the new type
- on the summary, try to add a file to the zone for "file_schema:attachments"
- observe that the file is not attached
Server side, "file_schema:attachments" is recognized as a BlobProperty (which cannot set multiple values) whereas "files:files" is recognized as a MapProperty
I've compared the definition generated by Studio with the default definition of "files:files"
<xs:complexType name="blobList"> <xs:sequence> <xs:element name="item" type="nxs:content" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:element name="attachments" type="nxs:blobList"/>
whereas files:files is defined by
<xs:element name="files" type="nxs:files" /> <xs:complexType name="files"> <xs:sequence> <xs:element name="item" type="nxs:file" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> </xs:complexType> <xs:complexType name="file"> <xs:sequence> <xs:element name="file" type="nxs:content" /> </xs:sequence> </xs:complexType>