This commit is contained in:
localhost 2024-12-04 09:09:34 +01:00
parent a559447e14
commit d81646e914
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,9 @@ const handleUpload = async (ws: any, videoId: string, isChannel: boolean = false
return true; return true;
} catch (error: any) { } catch (error: any) {
ws.send(`ERROR - Upload failed for ${videoId}: ${error.message}`); ws.send(`ERROR - Upload failed for ${videoId}: ${error.message}`);
fs.unlinkSync(filePath); console.log(`upload failed for ${videoId}: ${error.message}`)
if (fs.existsSync(filePath)) fs.unlinkSync(filePath)
return false; return false;
} }
}; };