Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Send MOV files as MP4 files
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent a02dc67 commit 20cb947
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions app/routes/report.tsx
Expand Up @@ -51,7 +51,7 @@ export default function () {
jpg: "image/jpg",
m4v: "video/x-m4v",
mkv: "video/x-matroska",
mov: "video/quicktime",
mov: "video/mp4",
mp4: "video/mp4",
png: "image/png",
webp: "image/webp",
Expand Down Expand Up @@ -209,8 +209,11 @@ export default function () {
duplex: supportsRequestStreams ? "half" : undefined,
headers: {
"content-type":
files[i].type ||
fileTypes[files[i].name.split(".").at(-1) as string],
(files[i].name.split(".").at(-1) as string).toLowerCase() ===
"mov"
? "video/mp4"
: files[i].type ||
fileTypes[files[i].name.split(".").at(-1) as string],
},
method: "PUT",
});
Expand Down
2 changes: 1 addition & 1 deletion functions/gcloud.ts
Expand Up @@ -29,7 +29,7 @@ export async function GenerateUploadURL(
jpg: "image/jpeg",
m4v: "video/x-m4v",
mkv: "video/x-matroska",
mov: "video/quicktime",
mov: "video/mp4",
mp4: "video/mp4",
png: "image/png",
webp: "image/webp",
Expand Down

0 comments on commit 20cb947

Please sign in to comment.