fix: update audio file naming in ZIP export to use original file names

This commit is contained in:
averel10
2026-03-13 12:16:42 +01:00
parent 5bde78e126
commit 2b6d23c406

View File

@@ -65,9 +65,7 @@ export async function POST(request: NextRequest) {
if (existsSync(audioPath)) {
const fileBuffer = await readFileAsync(audioPath);
// Use the original fileName from CSV, removing 'wavs_' prefix if present
const cleanFileName = entry.fileName.replace(/^wavs_/, '');
audioFolder.file(cleanFileName, fileBuffer);
zip.file(entry.fileName, fileBuffer);
filesAdded++;
} else {
console.warn(`Audio file not found: ${audioPath}`);