Merge pull request #4281 from scossar/add-m4a-to-audio-onebox-filetypes

FEATURE: add m4a to list of audio file extensions
This commit is contained in:
Arpit Jalan 2016-06-21 11:35:35 +05:30 committed by GitHub
commit bf7ea8bb73
1 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ Discourse.Utilities = {
getUploadMarkdown: function(upload) {
if (Discourse.Utilities.isAnImage(upload.original_filename)) {
return '<img src="' + upload.url + '" width="' + upload.width + '" height="' + upload.height + '">';
} else if (!Discourse.SiteSettings.prevent_anons_from_downloading_files && (/\.(mov|mp4|webm|ogv|mp3|ogg|wav)$/i).test(upload.original_filename)) {
} else if (!Discourse.SiteSettings.prevent_anons_from_downloading_files && (/\.(mov|mp4|webm|ogv|mp3|ogg|wav|m4a)$/i).test(upload.original_filename)) {
// is Audio/Video
return Discourse.Utilities.uploadLocation(upload.url);
} else {