DAM Asset detected as image/jpeg instead of word, pdf, ppt etc..
Last updated on May 17, 2021 04:37:15 AM GMT | Also Applies to CQ 5.3, CQ 5.4
If you try to upload the one of the attached Word documents (or PDF, PPT), it sometime fails and detect it as an image/jpeg, and leave the workflow instance stale.
Some error related to the image thumbnail creation also indicate that it tries to process the file as an image instead of the original content type (doc, ppt, pdf etc..).
This issue is due to the wrong dc:format metadata created. There is a workaround by extending the DAM update asset workflow model to fix this.
- Install attached content package via CQ Package Manager
* This provides a workflow ecma-script at /etc/workflows/scripts/dam/resetMimeType.ecma
- Open the Workflow admin console
- Edit the 'DAM Update Asset' workflow model
- Insert a Process step right after the 'Metadata extraction' step
- Set any title, e.g. 'Reset mimetype'
- In the Process tab of the properties dialog, select above ecma script: /etc/workflows/scripts/dam/resetMimeType.ecma
- Check the 'Handler Advance' flag checkbox
- Submit the dialog
- Save the workflow model
Now, try to upload the word document (or other document type that failed).