This commit is contained in:
2026-08-12 21:15:09 +02:00
parent b710f606ec
commit 23cbc689fb

View File

@@ -601,7 +601,7 @@ export const handleUpload = async (req, res, self) => {
// 4. Audio-only MP4 reclassification probe (only when needed)
needsAudioMP4
? (async () => {
const origExt = file.filename.split('.').pop().toLowerCase();
const origExt = file?.filename ? file.filename.split('.').pop().toLowerCase() : (inputUrl ? inputUrl.split('?')[0].split('.').pop().toLowerCase() : '');
if (['m4a', 'aac'].includes(origExt)) {
return 'audio/mp4'; // Extension-based reclassification
}