Uploaded image for project: 'DAM Focal'
  1. DAM Focal
  2. RESPDAM-15

Image MIME type read from node name

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1.4
    • Labels:
      None

      Description

      When an image is uploaded to the DAM, its MIME type is saved as the property jcr:mimeType on the binary node. Similarly the file name is saved as @fileName and the extension as @extension.

      However, when rendering a resized image, getOutputformat() of the class info.magnolia.dam.imaging.responsive.ui.imaging.ResponsiveImageOperationChain parses out the extension of the asset node's name which is assumed to be the name of the originally uploaded asset.

      This is very brittle and means that when the node name is something other than a filename with an extension the resizing process fails, resulting in the error:

       

       

      java.lang.IllegalStateException: untitled has no known entry in MIMEMapping
      info.magnolia.imaging.AbstractImageStreamer.getMediaType(AbstractImageStreamer.java:51)
      info.magnolia.imaging.DefaultImageStreamer.serveImage(DefaultImageStreamer.java:64)
       
      

       

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                amanzoni Adrien Manzoni
                Reporter:
                chris.jennings Chris Jennings
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                    Checklists

                    Bug DoR
                    DoD

                      Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 1h
                      1h