Skip to content

mimetype default list make a wrong guess for illustrator file #87710

Closed

Description

@inkhey
mannequin
BPO 43544
Nosy @inkhey

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2021-03-18.15:49:43.313>
labels = ['3.8', '3.9', '3.10']
title = 'mimetype default list make a wrong guess for illustrator file'
updated_at = <Date 2021-03-20.01:55:14.300>
user = 'https://github.com/inkhey'

bugs.python.org fields:

activity = <Date 2021-03-20.01:55:14.300>
actor = 'terry.reedy'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2021-03-18.15:49:43.313>
creator = 'Inkhey'
dependencies = []
files = []
hgrepos = []
issue_num = 43544
keywords = []
message_count = 1.0
messages = ['389023']
nosy_count = 1.0
nosy_names = ['Inkhey']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue43544'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

Linked PRs

Activity

  1. inkhey commented on Mar 18, 2021

    inkheymannequin
    MannequinAuthor

    mimetypes lib consider illustrator file ('.ai') as 'application/postscript' type. This is correct... but also wrong.

    Old illustrator file (illustrator 9) are real postscript file but modern one are technically pdf. So guessing .ai as postscript lead to wrong guessing if you're using some software that make decision based on mimetype, you can of course, check both file_extension and mimetype but this remove usefulness of mimetype.

  2. transferred this issue fromon Apr 10, 2022
  3. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Nov 27, 2023
  4. StanFromIreland commented on Nov 8, 2025

    @StanFromIreland
    Member

    Unfortunately the user is a mannequin. This is quite problematic, since we don't check contents like other mimetype checkers, there is no way of knowing if it is a new .ai file or an old one.

    Although, since the last version of AI to produce postscript files was released 25 years ago (see here), it can be assumed that the majority of files are now the modern PDF variation, and so IMO it makes sense to update it.

  5. added a commit that references this issue on Nov 12, 2025
  6. hugovk commented on Nov 12, 2025

    @hugovk
    Member
  7. aapa commented on Nov 12, 2025

    @aapa

    This Adobe documentation page (see the heading § Create PDF Compatible File option) seems to suggest that the PDF compatibility is an option, not a feature of the format itself. That would make the application/pdf filetype wrong. I don't have access to Adobe Illustrator to confirm what the resulting file looks like without the setting enabled, but this comment on Adobe Forums seems to suggest it's merely a PDF wrapper not viewable in any PDF standards supporting viewer. Yes, you probably still get more useful data out of it treating it as a PDF file instead of as a "traditional" Postscript file (I presume it would still have XMP data, for example), but it's still not PDF as defined by the PDF standards either. So something like application/vnd.adobe.illustrator or just the very nondescript but techically correct application/postscript would still be a better option IMO.

  8. added a commit that references this issue on Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions