]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Try to fix Mac video upload
authorChocobozzz <me@florianbigard.com>
Thu, 24 Jan 2019 14:23:06 +0000 (15:23 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 24 Jan 2019 14:23:06 +0000 (15:23 +0100)
client/src/app/+accounts/accounts.component.ts
server/helpers/custom-validators/videos.ts
server/initializers/constants.ts

index 036264602166486a4c220205a65e9a9177616a27..e8339b78bd76d80a95a16de0d4607a6d751b18b1 100644 (file)
@@ -26,8 +26,7 @@ export class AccountsComponent implements OnInit, OnDestroy {
     private notifier: Notifier,
     private restExtractor: RestExtractor,
     private redirectService: RedirectService,
-    private authService: AuthService,
-    private i18n: I18n
+    private authService: AuthService
   ) {}
 
   ngOnInit () {
index e6f22e6c52a3afe8e6edd44ba99f4bfd49e0a149..95e256b8fb9e8fdbe72959651dade5e7fdac58bd 100644 (file)
@@ -88,8 +88,8 @@ function isVideoFileExtnameValid (value: string) {
 
 function isVideoFile (files: { [ fieldname: string ]: Express.Multer.File[] } | Express.Multer.File[]) {
   const videoFileTypesRegex = Object.keys(MIMETYPES.VIDEO.MIMETYPE_EXT)
-                               .map(m => `(${m})`)
-                               .join('|')
+                                    .map(m => `(${m})`)
+                                    .join('|')
 
   return isFileValid(files, videoFileTypesRegex, 'videofile', null)
 }
index 93fdd3f035fa6de8cffe801496a95366526d11f4..6f3ebb9aa8af82ce81f2d0964110efd06e259af1 100644 (file)
@@ -795,7 +795,9 @@ function buildVideoMimetypeExt () {
       'video/quicktime': '.mov',
       'video/x-msvideo': '.avi',
       'video/x-flv': '.flv',
-      'video/x-matroska': '.mkv'
+      'video/x-matroska': '.mkv',
+      'application/octet-stream': '.mkv',
+      'video/avi': '.avi'
     })
   }