fix: data wrapped inside blob

This commit is contained in:
Chesterkxng 2025-12-10 18:16:20 +01:00
parent 29852a44dd
commit 29a174bc22

View File

@ -63,7 +63,13 @@ export async function convertAudio(
const baseName = input.name.replace(/\.[^.]+$/, ''); const baseName = input.name.replace(/\.[^.]+$/, '');
const convertedFileName = `${baseName}.${options.outputFormat}`; const convertedFileName = `${baseName}.${options.outputFormat}`;
return new File([data], convertedFileName, { type: mimeType }); return new File(
[new Blob([data as any], { type: mimeType })],
convertedFileName,
{
type: mimeType
}
);
} finally { } finally {
// Clean up FFmpeg virtual filesystem // Clean up FFmpeg virtual filesystem
try { try {