π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
fix: allow mov
Nevo Daviddcb5b09e0ec6
diff --git a/libraries/nestjs-libraries/src/upload/r2.uploader.ts b/libraries/nestjs-libraries/src/upload/r2.uploader.tsindex 3164d5ed8..f753c4967 100644--- a/libraries/nestjs-libraries/src/upload/r2.uploader.ts+++ b/libraries/nestjs-libraries/src/upload/r2.uploader.ts@@ -232,9 +232,15 @@ export async function completeMultipartUpload(req: Request, res: Response) {const prefix = Buffer.concat(chunks);const detected = await fileTypeFromBuffer(prefix);- // a .mov with an ISO brand sniffs as video/mp4; the normalizer reads both+ // .mov and .mp4 are the same ISO BMFF family: a .mov with an ISO brand+ // sniffs as video/mp4 and a QuickTime-brand file is often named .mp4.+ // The normalizer reads both and always writes an mp4, so accept both+ // for either extension whenever it is on; without it .mp4 stays strict.const acceptedMimes =- safeExt === '.mov' ? ['video/quicktime', 'video/mp4'] : [expectedMime];+ UploadFactory.processorEnabled() &&+ (safeExt === '.mov' || safeExt === '.mp4')+ ? ['video/quicktime', 'video/mp4']+ : [expectedMime];if (!detected || !acceptedMimes.includes(detected.mime)) {await R2.send(new DeleteObjectCommand({ Bucket: CLOUDFLARE_BUCKETNAME, Key: key })