diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-14 15:33:49 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-14 16:03:09 +0100 |
commit | e3a682a877a10833cb54ac3595e55110bda95647 (patch) | |
tree | 4c9e2e31be234720a72988f2e9ad8f4a002ec4c8 /server/controllers/api/videos/index.ts | |
parent | a0922eb9b3750ab6de31116531b625643930b38c (diff) | |
download | PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.tar.gz PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.tar.zst PeerTube-e3a682a877a10833cb54ac3595e55110bda95647.zip |
Handle thumbnail update
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r-- | server/controllers/api/videos/index.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 1a4de081f..10b6c000f 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -195,7 +195,10 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi | |||
195 | const videoFile = new VideoFileModel(videoFileData) | 195 | const videoFile = new VideoFileModel(videoFileData) |
196 | const videoDir = CONFIG.STORAGE.VIDEOS_DIR | 196 | const videoDir = CONFIG.STORAGE.VIDEOS_DIR |
197 | const destination = join(videoDir, video.getVideoFilename(videoFile)) | 197 | const destination = join(videoDir, video.getVideoFilename(videoFile)) |
198 | |||
198 | await renamePromise(videoPhysicalFile.path, destination) | 199 | await renamePromise(videoPhysicalFile.path, destination) |
200 | // This is important in case if there is another attempt in the retry process | ||
201 | videoPhysicalFile.filename = video.getVideoFilename(videoFile) | ||
199 | 202 | ||
200 | // Process thumbnail or create it from the video | 203 | // Process thumbnail or create it from the video |
201 | const thumbnailField = req.files['thumbnailfile'] | 204 | const thumbnailField = req.files['thumbnailfile'] |