Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illustrator file is not uploadable #6348

Open
patricsgamma opened this issue May 14, 2024 · 1 comment
Open

Illustrator file is not uploadable #6348

patricsgamma opened this issue May 14, 2024 · 1 comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@patricsgamma
Copy link

patricsgamma commented May 14, 2024

Link to reproduction

Describe the Bug

Setup

Adobe Illustrator files come with 1 of 2 mimeType's, where pdf one is the recent one.
application/vsn.adobe.illustrator, application/pdf

Error

Configuring an upload collection allowing both, still doesn't let me upload an Illustrator .ai file.

We receive a
ValidationError: The following field is invalid: mimeType

Out of some reason the file is interpreted as a 'application/postscript' even though getting File infos tells us its a pdf

file --mime-type -b my_illustrator_file.ai 
application/pdf

To Reproduce

Configure a upload collection with

upload: {
   mimeTypes: [
     'application/vsn.adobe.illustrator',
     'application/pdf',
   ],
 },

Try to upload an illustrator file.

Payload Version

2.16.1

Adapters and Plugins

"@payloadcms/bundler-webpack": "^1.0.6",
"@payloadcms/db-mongodb": "^1.5.1",
"@payloadcms/plugin-cloud-storage": "^1.1.2",
"@payloadcms/plugin-sentry": "^0.0.6",
"@payloadcms/richtext-lexical": "^0.10.0",

@patricsgamma patricsgamma added the status: needs-triage Possible bug which hasn't been reproduced yet label May 14, 2024
@patricsgamma
Copy link
Author

patricsgamma commented May 14, 2024

With the knowledge that 'application/postscript' works we can get around the issue.
But its still strange and misleading when the OS tells you a file is a certain mimeType and then it turns to something different on upload into the CMS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant