diff options
-rw-r--r-- | client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts | 4 | ||||
-rw-r--r-- | server/initializers/constants.ts | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts index aa3a85995..aa87f9581 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts | |||
@@ -293,6 +293,8 @@ export class VideoUploadComponent extends VideoSend implements OnInit, OnDestroy | |||
293 | } | 293 | } |
294 | 294 | ||
295 | private isAudioFile (filename: string) { | 295 | private isAudioFile (filename: string) { |
296 | return filename.endsWith('.mp3') || filename.endsWith('.flac') || filename.endsWith('.ogg') | 296 | const extensions = [ '.mp3', '.flac', '.ogg', '.wma', '.wav' ] |
297 | |||
298 | return extensions.some(e => filename.endsWith(e)) | ||
297 | } | 299 | } |
298 | } | 300 | } |
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index e4b8a8eca..8f5c1df1d 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -403,6 +403,9 @@ const MIMETYPES = { | |||
403 | 'audio/mp3': '.mp3', | 403 | 'audio/mp3': '.mp3', |
404 | 'application/ogg': '.ogg', | 404 | 'application/ogg': '.ogg', |
405 | 'audio/ogg': '.ogg', | 405 | 'audio/ogg': '.ogg', |
406 | 'audio/x-ms-wma': '.wma', | ||
407 | 'audio/wav': '.wav', | ||
408 | 'audio/x-flac': '.flac', | ||
406 | 'audio/flac': '.flac' | 409 | 'audio/flac': '.flac' |
407 | }, | 410 | }, |
408 | EXT_MIMETYPE: null as { [ id: string ]: string } | 411 | EXT_MIMETYPE: null as { [ id: string ]: string } |