-
Notifications
You must be signed in to change notification settings - Fork 2k
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
File names turn into gibberish when uploading via the Uploads interface (Media) #8107
Comments
roi-polisave
added
status: needs-triage
Possible bug which hasn't been reproduced yet
v3
labels
Sep 7, 2024
5 tasks
For now, you can define in your root config: upload: {
defParamCharset: "utf8"
} PR #8157 to make it default |
github-actions
bot
removed
the
status: needs-triage
Possible bug which hasn't been reproduced yet
label
Sep 10, 2024
r1tsuu
added a commit
that referenced
this issue
Sep 10, 2024
## Description Fixes #8107 This has been confusing for people from countries where characters aren't latin, for example the Japanese file name: フェニックス.png Turns into: ãã§ããã¯ã¹.png Additionally, ensures type-safety for `DEFAULT_OPTIONS` and removes unused `fileHandler` property from there, which isn't defined in the `FetchAPIFileUploadOptions` type. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist: - [ ] I have added tests that prove my fix is effective or that my feature works - [x] Existing test suite passes locally with my changes - [ ] I have made corresponding changes to the documentation
🚀 This is included in version v3.0.0-beta.103 |
Thank you very much, I checked and it works :) |
This issue has been automatically locked. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Link to reproduction
No response
Environment Info
Describe the Bug
I’ve encountered an issue where file names turn into gibberish when uploading files through the Payload CMS Uploads interface. This happens with files that have non-ASCII characters (e.g., Hebrew or Japanese file names). I have tested this on both Chrome and Firefox browsers on a MacOS system.
I found that there was a similar issue in Postman (issue reference: Postman GitHub Issue #5912), where multipart/form-data requests with non-ASCII file names were being altered. This might indicate a similar encoding issue in Payload CMS and could be related to how the encoding is handled in the request headers.
Examples:
Original file name: フェニックス.png (Japanese)
After upload: ãã§ããã¯ã¹.png
Original file name: בדיקה.png (Hebrew)
After upload: ×××ק×.png
Original file name: 検査.png (Japanese)
After upload: æ¤æ».png
Reproduction Steps
Adapters and Plugins
No response
The text was updated successfully, but these errors were encountered: