fix: update audio file naming in ZIP export to remove 'wavs_' prefix

This commit is contained in:
averel10
2026-03-13 12:11:48 +01:00
parent 204eb483c2
commit 5bde78e126
2 changed files with 3 additions and 2 deletions

View File

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