-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Bug Report
Current Behavior
MIME type of "video/webm;codecs=opus" parse corrent
but
MIME type of "video/webm;codecs=vp8,opus" parse incorrect
"video/webm;codecs=opus" is generated by recording audio using MediaRecorder
"video/webm;codecs=vp8,opus" is generated by recording video using MediaRecorder
Input Code
Passing a File file with MIME type "video/webm;codecs=vp8,opus" using formdata
// web
File {
...
type: "video/webm;codecs=vp8,opus"
...
}
// koa
import multer from "@koa/multer";
export const upload = multer();
router.post("/wechat/upload", upload.single("file"), uploadWeChatFile);
export const uploadWeChatFile = async (ctx: Context) => {
const file = ctx.file;
console.log(file, "file");
};
File {
...
mimetype: 'text/plain', // error, not my mime type
...
}
Expected behavior/code
I expect to use @koa/muter, I can get the corrent mime type for "video/webm;codecs=vp8,opus" mimetype
Environment
- Node/pnpm version: [Node v20.19.0 / pnpm 9.7.0]
- @koa/multer & koa version: [@koa/multer 4.0.0 / koa 3.0.0]
- OS: [15.6.1 (24G90)]
- Monorepo: [no]
Possible Solution
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.


Metadata
Metadata
Assignees
Labels
No labels