aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-24 15:23:06 +0100
committerChocobozzz <me@florianbigard.com>2019-01-24 15:23:06 +0100
commit307902e2b3248073aeb677e420aafd8b5e041117 (patch)
tree58076eec0c4668b299a1ecb0c5497cd13ca4678a
parent572b8e02e258bfa921032dee593d3c2f129852b6 (diff)
downloadPeerTube-307902e2b3248073aeb677e420aafd8b5e041117.tar.gz
PeerTube-307902e2b3248073aeb677e420aafd8b5e041117.tar.zst
PeerTube-307902e2b3248073aeb677e420aafd8b5e041117.zip
Try to fix Mac video upload
-rw-r--r--client/src/app/+accounts/accounts.component.ts3
-rw-r--r--server/helpers/custom-validators/videos.ts4
-rw-r--r--server/initializers/constants.ts4
3 files changed, 6 insertions, 5 deletions
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts
index 036264602..e8339b78b 100644
--- a/client/src/app/+accounts/accounts.component.ts
+++ b/client/src/app/+accounts/accounts.component.ts
@@ -26,8 +26,7 @@ export class AccountsComponent implements OnInit, OnDestroy {
26 private notifier: Notifier, 26 private notifier: Notifier,
27 private restExtractor: RestExtractor, 27 private restExtractor: RestExtractor,
28 private redirectService: RedirectService, 28 private redirectService: RedirectService,
29 private authService: AuthService, 29 private authService: AuthService
30 private i18n: I18n
31 ) {} 30 ) {}
32 31
33 ngOnInit () { 32 ngOnInit () {
diff --git a/server/helpers/custom-validators/videos.ts b/server/helpers/custom-validators/videos.ts
index e6f22e6c5..95e256b8f 100644
--- a/server/helpers/custom-validators/videos.ts
+++ b/server/helpers/custom-validators/videos.ts
@@ -88,8 +88,8 @@ function isVideoFileExtnameValid (value: string) {
88 88
89function isVideoFile (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[]) { 89function isVideoFile (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[]) {
90 const videoFileTypesRegex = Object.keys(MIMETYPES.VIDEO.MIMETYPE_EXT) 90 const videoFileTypesRegex = Object.keys(MIMETYPES.VIDEO.MIMETYPE_EXT)
91 .map(m => `(${m})`) 91 .map(m => `(${m})`)
92 .join('|') 92 .join('|')
93 93
94 return isFileValid(files, videoFileTypesRegex, 'videofile', null) 94 return isFileValid(files, videoFileTypesRegex, 'videofile', null)
95} 95}
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 93fdd3f03..6f3ebb9aa 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -795,7 +795,9 @@ function buildVideoMimetypeExt () {
795 'video/quicktime': '.mov', 795 'video/quicktime': '.mov',
796 'video/x-msvideo': '.avi', 796 'video/x-msvideo': '.avi',
797 'video/x-flv': '.flv', 797 'video/x-flv': '.flv',
798 'video/x-matroska': '.mkv' 798 'video/x-matroska': '.mkv',
799 'application/octet-stream': '.mkv',
800 'video/avi': '.avi'
799 }) 801 })
800 } 802 }
801 803