Removed the uploadDir

This commit is contained in:
Tiago Ribeiro
2023-08-31 08:35:21 +01:00
parent 17ff85b62b
commit c23c07ae38

View File

@@ -18,7 +18,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
const storage = getStorage(app); const storage = getStorage(app);
const form = formidable({keepExtensions: true, uploadDir: "./"}); const form = formidable({keepExtensions: true});
await form.parse(req, async (err: any, fields: any, files: any) => { await form.parse(req, async (err: any, fields: any, files: any) => {
const audioFile = files.audio; const audioFile = files.audio;
const audioFileRef = ref(storage, `speaking_recordings/${(audioFile as any).path.replace("upload_", "")}`); const audioFileRef = ref(storage, `speaking_recordings/${(audioFile as any).path.replace("upload_", "")}`);