Don't add t/ prefix to videos that don't need processing

This commit is contained in:
2024-03-25 23:17:52 -04:00
parent a7c7b42de2
commit 09fae0594e

View File

@ -163,7 +163,12 @@ export async function onRequestPost(context: RequestContext) {
)}${Date.now()}`; )}${Date.now()}`;
uploadUrlPromises.push( uploadUrlPromises.push(
upload(context.env, `t/${fileUploadKey}`, file.size, fileExten), upload(
context.env,
`${["mp4", "m4v", "webm"].includes(fileExten.toLowerCase()) ? "" : "t/"}${fileUploadKey}`,
file.size,
fileExten,
),
); );
if (!["mp4", "m4v", "webm"].includes(fileExten)) { if (!["mp4", "m4v", "webm"].includes(fileExten)) {