aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-02-07 09:10:59 +0100
committerChocobozzz <me@florianbigard.com>2020-02-07 09:10:59 +0100
commit338eb9d33af690db716805fd2277bf68f473b58f (patch)
tree98b0979d3a9adf1c835dcfce6c1459e499f0a509
parenta0e35412b92afa42dee54165afa51fa3953a1252 (diff)
parent26469f9ed85f5e7d67ccecaa820f33e37179b76a (diff)
downloadPeerTube-338eb9d33af690db716805fd2277bf68f473b58f.tar.gz
PeerTube-338eb9d33af690db716805fd2277bf68f473b58f.tar.zst
PeerTube-338eb9d33af690db716805fd2277bf68f473b58f.zip
Merge branch 'release/2.1.0' into develop
-rw-r--r--client/src/app/videos/+video-edit/video-add-components/video-upload.component.ts4
-rw-r--r--server/initializers/constants.ts5
2 files changed, 8 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 0476815f4..cb1c6f2ae 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -406,6 +406,9 @@ const MIMETYPES = {
406 'audio/mp3': '.mp3', 406 'audio/mp3': '.mp3',
407 'application/ogg': '.ogg', 407 'application/ogg': '.ogg',
408 'audio/ogg': '.ogg', 408 'audio/ogg': '.ogg',
409 'audio/x-ms-wma': '.wma',
410 'audio/wav': '.wav',
411 'audio/x-flac': '.flac',
409 'audio/flac': '.flac' 412 'audio/flac': '.flac'
410 }, 413 },
411 EXT_MIMETYPE: null as { [ id: string ]: string } 414 EXT_MIMETYPE: null as { [ id: string ]: string }
@@ -797,6 +800,8 @@ function buildVideoMimetypeExt () {
797 'video/x-matroska': '.mkv', 800 'video/x-matroska': '.mkv',
798 'video/avi': '.avi', 801 'video/avi': '.avi',
799 'video/x-m4v': '.m4v', 802 'video/x-m4v': '.m4v',
803 // Could be anything
804 'application/octet-stream': null,
800 'video/m4v': '.m4v' 805 'video/m4v': '.m4v'
801 }) 806 })
802 } 807 }