Send MOV files as MP4 files
This commit is contained in:
parent
a02dc67172
commit
20cb94729e
@ -51,7 +51,7 @@ export default function () {
|
|||||||
jpg: "image/jpg",
|
jpg: "image/jpg",
|
||||||
m4v: "video/x-m4v",
|
m4v: "video/x-m4v",
|
||||||
mkv: "video/x-matroska",
|
mkv: "video/x-matroska",
|
||||||
mov: "video/quicktime",
|
mov: "video/mp4",
|
||||||
mp4: "video/mp4",
|
mp4: "video/mp4",
|
||||||
png: "image/png",
|
png: "image/png",
|
||||||
webp: "image/webp",
|
webp: "image/webp",
|
||||||
@ -209,8 +209,11 @@ export default function () {
|
|||||||
duplex: supportsRequestStreams ? "half" : undefined,
|
duplex: supportsRequestStreams ? "half" : undefined,
|
||||||
headers: {
|
headers: {
|
||||||
"content-type":
|
"content-type":
|
||||||
files[i].type ||
|
(files[i].name.split(".").at(-1) as string).toLowerCase() ===
|
||||||
fileTypes[files[i].name.split(".").at(-1) as string],
|
"mov"
|
||||||
|
? "video/mp4"
|
||||||
|
: files[i].type ||
|
||||||
|
fileTypes[files[i].name.split(".").at(-1) as string],
|
||||||
},
|
},
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
});
|
});
|
||||||
|
@ -29,7 +29,7 @@ export async function GenerateUploadURL(
|
|||||||
jpg: "image/jpeg",
|
jpg: "image/jpeg",
|
||||||
m4v: "video/x-m4v",
|
m4v: "video/x-m4v",
|
||||||
mkv: "video/x-matroska",
|
mkv: "video/x-matroska",
|
||||||
mov: "video/quicktime",
|
mov: "video/mp4",
|
||||||
mp4: "video/mp4",
|
mp4: "video/mp4",
|
||||||
png: "image/png",
|
png: "image/png",
|
||||||
webp: "image/webp",
|
webp: "image/webp",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user