We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Broken filenames, when uploading filenames with non ascii characters as media / thumbnail.
Medusa version (including plugins): 1.20.2 Node.js version: v18.18.0 Database: postgres Operating system: windows
테스트-강아지.jpg
Temporary fix by overwriting the route and use multer-utf8
multer-utf8
api/middlewares.ts
import type { MiddlewaresConfig } from "@medusajs/medusa"; import multer from "multer-utf8"; const upload = multer({ dest: "uploads/", charset: "utf8", }); export const config: MiddlewaresConfig = { routes: [ { matcher: "/admin/uploads", middlewares: [upload.array("files")], // OVERWRITE ADMIN UPLOAD DUE UTF8 ISSUE }, { matcher: "/admin/uploads/protected", middlewares: [upload.array("files")], // OVERWRITE ADMIN UPLOAD DUE UTF8 ISSUE }, ], };
api/admin/uploads/route.ts
import createUpload from "@medusajs/medusa/dist/api/routes/admin/uploads/create-upload"; export const POST = createUpload;
api/admin/uploads/protected/route.ts
import createProtectedUpload from "@medusajs/medusa/dist/api/routes/admin/uploads/create-protected-upload"; export const POST = createProtectedUpload;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug report
Describe the bug
Broken filenames, when uploading filenames with non ascii characters as media / thumbnail.
System information
Medusa version (including plugins): 1.20.2
Node.js version: v18.18.0
Database: postgres
Operating system: windows
Steps to reproduce the behavior
테스트-강아지.jpg
Screenshots
Code snippets
Temporary fix by overwriting the route and use
multer-utf8
api/middlewares.ts
api/admin/uploads/route.ts
api/admin/uploads/protected/route.ts
Additional Context
The text was updated successfully, but these errors were encountered: