aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-03 11:10:31 +0200
committerChocobozzz <me@florianbigard.com>2018-08-06 11:19:16 +0200
commit5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e (patch)
treedd992ea798c620b8bdb5bf5fd9b8f1b97d4410f2 /server/controllers/api/videos
parent7e5f9f001d5de22c54748f935edc0c069028bb0e (diff)
downloadPeerTube-5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e.tar.gz
PeerTube-5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e.tar.zst
PeerTube-5d08a6a74e83f2e4dfe2f3ba7f5a39371e1bc89e.zip
Add import http enabled configuration
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]