Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-784

Sequencing JCR file structures doesn't use the filename for MIME type detection

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Final
    • 1.2.0.Final
    • Sequencers
    • None

      When a file is uploaded into JCR, the standard file structure is:

      • a node of type "nt:file" named with the name of the file (e.g., "MyFile.txt")
      • a child of the "nt:file" node, named "jcr:content", where the binary content of the file is stored as property "jcr:data"

      When the "jcr:data" property value is saved, the sequencing service detects this and attempts to sequence the "jcr:content" node. And prior to sequencing, the service attempts to detect the MIME type of the file content (using a combination of the filename and content, as configured). However, the service is grabbing and using the local name of the "jcr:content" node (e.g., "content") for MIME type detection, which is invalid. The sequencing service should detect this pattern and grab/use the local name of the parent of the sequenced node.

      See the referenced forum for a suggested fix, although the fix should probably use the JcrLexicon.CONTENT Name constant rather than a magic string.

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: