-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 7.4
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Binary Metadata
-
Tags:
Using a 7.4-SNAPSHOT from sept 24:
- Setup the following XML contribution with Studio:
<extension target="org.nuxeo.binary.metadata" point="metadataMappings"> <!-- Define "processor" to use and specify the attached binary's xpath ("blobXPath") --> <!-- Technical "id" should be unique --> <!-- "ignorePrefix" is by default set to true. Here metadata have prefixes, so set it to false. --> <metadataMapping id="Example" processor="exifTool" blobXPath="file:content" ignorePrefix="false"> <!-- "name" = binary metadata , "xpath" = document metadata --> <!-- See PDF metadata extraction example in this page --> <metadata name="PDF:PDFVersion" xpath="dc:title"/> <metadata name="PDF:Linearized" xpath="dc:description"/> <metadata name="File:MIMEType" xpath="dc:source"/> <metadata name="File:FilePermissions" xpath="dc:rights"/> </metadataMapping> </extension> <!-- Define which mappings will be called by the listener, and under which conditions --> <extension target="org.nuxeo.binary.metadata" point="metadataRules"> <!-- "order" = priority , "async" = listener mode (set "true" to apply mapping as background work) --> <!-- Technical "id" should be unique --> <rule id="default" order="0" enabled="true" async="false"> <metadataMappings> <metadataMapping-id>Example</metadataMapping-id> </metadataMappings> <!-- see the link below for filter contributions --> <filters> <filter-id>hasFileType</filter-id> </filters> </rule> </extension> <extension target="org.nuxeo.ecm.platform.actions.ActionService" point="filters"> <filter id="hasFileType"> <rule grant="true"> <type>File</type> </rule> </filter> </extension>
Import a PDF file into the Platform.
=> Import works correctly
Update the document's title and / or dc:rights with "some text"
=> An error is triggered by exiftool
=> The reason for it this error is obvious, you can't just write the PDF version or the file rights from this metadata
=> When you go back to the document, the file is not stored in the document anymore
=> Attachments shouldn't disappear because of an exiftool error, the file update process should be transactional