1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Stop caching upload after successful upload

Just forbid sending 2 concurrent requests, but let the user decide if
it wants to upload the same video multiple times
This commit is contained in:
Chocobozzz 2024-02-19 14:41:38 +01:00
parent ebe828ec75
commit 7b86b9b458
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 9 additions and 85 deletions

View file

@ -123,7 +123,8 @@ async function addVideoResumable (req: express.Request, res: express.Response) {
const files = { previewfile: videoInfo.previewfile, thumbnailfile: videoInfo.thumbnailfile }
const response = await addVideo({ req, res, videoPhysicalFile, videoInfo, files })
await Redis.Instance.setUploadSession(req.query.upload_id, response)
await Redis.Instance.deleteUploadSession(req.query.upload_id)
await uploadx.storage.delete(res.locals.uploadVideoFileResumable)
return res.json(response)
}