aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/import.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index 33ac83cb9..ee11b0741 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -77,7 +77,7 @@ async function addVideoImport (req: express.Request, res: express.Response) {
77 video.url = getVideoActivityPubUrl(video) 77 video.url = getVideoActivityPubUrl(video)
78 78
79 // Process thumbnail file? 79 // Process thumbnail file?
80 const thumbnailField = req.files['thumbnailfile'] 80 const thumbnailField = req.files ? req.files['thumbnailfile'] : undefined
81 let downloadThumbnail = true 81 let downloadThumbnail = true
82 if (thumbnailField) { 82 if (thumbnailField) {
83 const thumbnailPhysicalFile = thumbnailField[ 0 ] 83 const thumbnailPhysicalFile = thumbnailField[ 0 ]
@@ -86,7 +86,7 @@ async function addVideoImport (req: express.Request, res: express.Response) {
86 } 86 }
87 87
88 // Process preview file? 88 // Process preview file?
89 const previewField = req.files['previewfile'] 89 const previewField = req.files ? req.files['previewfile'] : undefined
90 let downloadPreview = true 90 let downloadPreview = true
91 if (previewField) { 91 if (previewField) {
92 const previewPhysicalFile = previewField[0] 92 const previewPhysicalFile = previewField[0]