Fix concurrency issue on video upload
authorChocobozzz <me@florianbigard.com>
Wed, 14 Feb 2018 17:40:39 +0000 (18:40 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 14 Feb 2018 17:40:39 +0000 (18:40 +0100)
server/controllers/api/videos/index.ts

index 10b6c000f74168a807246878d989ecd835dd42bb..564ccd3f8d7fc01b4b70bddd3b793a3b766053d9 100644 (file)
@@ -199,6 +199,7 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi
   await renamePromise(videoPhysicalFile.path, destination)
   // This is important in case if there is another attempt in the retry process
   videoPhysicalFile.filename = video.getVideoFilename(videoFile)
+  videoPhysicalFile.path = destination
 
   // Process thumbnail or create it from the video
   const thumbnailField = req.files['thumbnailfile']