Tika
  1. Tika
  2. TIKA-588

MIME detection for iWork documents returns application/zip

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: mime
    • Labels:
      None

      Description

      When using Tika.detect() on iWork files, it always returns application/zip. Although the ZipContainerDetector is called by the CompositeDetector, the iWork mime types (application/vnd.apple.keynote, application/vnd.apple.pages, application/vnd.apple.numbers) are not configured to be subtypes of application/vnd.apple.iwork or application/zip.

      1. iWork.patch
        1 kB
        Alexander Chow

        Activity

        Hide
        Alexander Chow added a comment -

        Patch file has been attached.

        Show
        Alexander Chow added a comment - Patch file has been attached.
        Hide
        Nick Burch added a comment -

        I've tweaked the mimetypes file with your change and a few related ones, thanks for your patch

        TestContainerAwareDetector has tests which show that with the container aware detector we detect correctly.

        TestMimeTypes now has a new test which shows we can do it with the filename, but for pure data based you need a container detector

        Show
        Nick Burch added a comment - I've tweaked the mimetypes file with your change and a few related ones, thanks for your patch TestContainerAwareDetector has tests which show that with the container aware detector we detect correctly. TestMimeTypes now has a new test which shows we can do it with the filename, but for pure data based you need a container detector
        Hide
        Alexander Chow added a comment -

        Excellent. Thanks.

        Show
        Alexander Chow added a comment - Excellent. Thanks.

          People

          • Assignee:
            Unassigned
            Reporter:
            Alexander Chow
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development