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

Image MIME type read from node name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.1.4
    • 1.1
    • None
    • None

      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)
       
      

       

        Acceptance criteria

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

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

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