[MGNLDAM-965] Mime types of files uploaded via Zip-Upload action are not resolved correctly Created: 28/Apr/21  Updated: 24/May/21  Resolved: 21/May/21

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: 3.0
Fix Version/s: 3.0.8

Type: Bug Priority: Major
Reporter: Tomáš Gregovský Assignee: Adam Siska
Resolution: Fixed Votes: 0
Labels: maintenance
Remaining Estimate: Not Specified
Time Spent: 34m
Original Estimate: Not Specified

Attachments: PNG File Screenshot_2021-04-26_at_10_48_03.png    
Issue Links:
Cloners
clones MGNLUI-6670 mime types of files uploaded via File... Closed
relation
Template:
Acceptance criteria:
[ ]* resolve mime types of JS and CSV correctly
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Sprint: Maintenance 58

 Description   

 

When uploading non-binary asset in a zipped file, the resolved mime type of stored asset is incorrectly set to text/plain.

This issue is harder to observe due to MGNLUI-6670 which masks the problem by showing mime type of text file in the asset detail always as text/plain.

To reproduce:

  1. pack a text file (js or csv) in a zip file
  2. zip-upload file with image into dam via Assets app action
  3. observe stored mimetype (eg vie JCR Tools/Dumper or via export of the asset)


 Comments   
Comment by Thomas Martin [ 30/Apr/21 ]

I had the problem with SVG-files.
As a fix for this problem, i added the filename in TIKA.detect() at /info/magnolia/dam/app/action/UploadAssetsAction.java:165

Generated at Mon Feb 12 05:05:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.