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

Make mime-type detection configurable allowing either no detection, name or content-based detection

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 4.4.0.Final
    • 4.3.0.Final
    • Performance
    • None

    Description

      ModeShape has a built-in TikaMimeTypeDetector which, when adding a binary into the repository if the node which owns the binary property is mix:mimetype, will automatically trigger a full (content based) mime type detection process. This content based detection process means that each such binary will have its content read into memory each time a new binary value is added.

      This is a nice feature which could prove useful in some cases, but when working with lots and/or large binaries can be extremely ineffective.

      There may be other cases when users using the default [nt:resource] type (or other mix:mimetype) nodes are well-enough off using the actual name of the file as the name of the node. In other words, there may be cases where using the name + extension of the file is enough information which can be used without having to read the full content of the binary.

      This enhancement is about changing the repository configuration allowing users to choose between no mimetype detection, content or name based detection.

      For example:

      repository {
        binaryStorage: {
          "mimeTypeDetection" : ["content", "name", "none"]   
        }
      }
      

      where the default value is content to preserve the current functionality as is.

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            hchiorean Horia Chiorean (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: