Added a log for when there is an error
This commit is contained in:
@@ -20,6 +20,8 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
|
|
||||||
const form = formidable({keepExtensions: true});
|
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) => {
|
||||||
|
if (err) console.log(err);
|
||||||
|
|
||||||
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