Removed the uploadDir
This commit is contained in:
@@ -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_", "")}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user