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

[bug]: KMZ File Upload Not Recognized When Specified as MIME Type #949

Open
1 of 2 tasks
oliverox opened this issue Sep 15, 2024 · 8 comments
Open
1 of 2 tasks

[bug]: KMZ File Upload Not Recognized When Specified as MIME Type #949

oliverox opened this issue Sep 15, 2024 · 8 comments
Labels
area:packages issue regarding one of the uploadthing packages bug: low priority something isn't working as it should, but it's not critical to the core functionality ✨ enhancement suggestion or feature request to improve uploadthing haunted things that will likely be difficult to test / find root causes on

Comments

@oliverox
Copy link

Provide environment information

System:
    OS: macOS 14.6.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 1.99 GB / 16.00 GB
    Shell: 3.3.1 - /usr/local/bin/fish
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
    pnpm: 9.10.0 - ~/Library/pnpm/pnpm
  Browsers:
    Brave Browser: 128.1.69.162
    Chrome: 128.0.6613.137
    Safari: 17.6
    Safari Technology Preview: 18.0
  npmPackages:
    @uploadthing/react: ^7.0.1 => 7.0.1
    typescript: ^5.6.2 => 5.6.2
    uploadthing: ^7.0.1 => 7.0.1

Describe the bug

When attempting to upload a file with the .kmz extension, the file is not being picked up by UT even if the correct application/vnd.google-earth.kmz+xml MIME type is specified. Moreover, when the file picker dialog shows up, the other non *.kmz files are not disabled. This issue occurs even though other file types work as expected with their corresponding MIME types.

Link to reproduction

https://stackblitz.com/edit/github-kaem89

To reproduce

Click on "Choose File" to select a .kml file to upload.
=> Nothing happens.

However, changing the MIME type to "blob" allows the .kml (or any file) to be uploaded successfully.

Additional information

Bug is reproducible on both latest and legacy versions of UT.
https://x.com/oliveroxenham/status/1834803745894670599

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd be down to file a PR fixing this bug!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@oliverox oliverox added area:packages issue regarding one of the uploadthing packages 🐛 bug: unconfirmed labels Sep 15, 2024
@markflorkowski
Copy link
Collaborator

Can you provide sample .kmz and .kml files I can test with?

@oliverox
Copy link
Author

I sure can. I am currently travelling but will share as soon as I get some internet access.

@oliverox
Copy link
Author

You can get a KML file here: https://utfs.io/f/5Bp1JPFX6nSx9Vh6JEMecTo7vnCiflpF1Q8WNHYE3J4DKS6u

@markflorkowski
Copy link
Collaborator

Will take a look at this tomorrow morning!

@juliusmarminge
Copy link
Member

juliusmarminge commented Sep 16, 2024

it appears my computer doesn't recognize the mime-type here:

CleanShot 2024-09-16 at 10 33 05

@markflorkowski
Copy link
Collaborator

Yeah, confirmed on mimtype.io, seems like browser does not detect.

image

We could potentially build in functionality to the components to handle cases like these, though we wouldn't be able to get the filtering in the file selection window, just pre-upload validation.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had any activity for 10 days. It will be closed in 5 days if no further activity occurs.

@github-actions github-actions bot added the stale No activity in the past 10 days label Sep 27, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

This issue has been closed because it has not had any activity for 5 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
@markflorkowski markflorkowski added haunted things that will likely be difficult to test / find root causes on bug: low priority something isn't working as it should, but it's not critical to the core functionality ✨ enhancement suggestion or feature request to improve uploadthing and removed stale No activity in the past 10 days 🐛 bug: unconfirmed labels Oct 3, 2024
@markflorkowski markflorkowski reopened this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:packages issue regarding one of the uploadthing packages bug: low priority something isn't working as it should, but it's not critical to the core functionality ✨ enhancement suggestion or feature request to improve uploadthing haunted things that will likely be difficult to test / find root causes on
Projects
None yet
Development

No branches or pull requests

3 participants