Skip to content
Snippets Groups Projects
Commit 6a52f623 authored by フィンメーラ's avatar フィンメーラ Committed by Gabriel Engel
Browse files

[FIX] Sound upload not working in IE and FF (#11139)

parent 94ad01f9
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div class="input-line"> <div class="input-line">
<label for="image">{{_ "Sound_File_mp3"}}</label> <label for="image">{{_ "Sound_File_mp3"}}</label>
<input id="image" type="file" accept="audio/mp3,audio/mpeg"/> <input id="image" type="file" accept="audio/mp3,audio/mpeg,audio/x-mpeg,audio/mpeg3,audio/x-mpeg-3,.mp3"/>
</div> </div>
<nav> <nav>
<button class='button button-block cancel' type="button"><span>{{_ "Cancel"}}</span></button> <button class='button button-block cancel' type="button"><span>{{_ "Cancel"}}</span></button>
......
...@@ -93,7 +93,7 @@ Template.soundEdit.onCreated(function() { ...@@ -93,7 +93,7 @@ Template.soundEdit.onCreated(function() {
} }
if (this.soundFile) { if (this.soundFile) {
if (!/audio\/mp3/.test(this.soundFile.type)) { if (!/audio\/mp3/.test(this.soundFile.type) && !/audio\/mpeg/.test(this.soundFile.type) && !/audio\/x-mpeg/.test(this.soundFile.type)) {
errors.push('FileType'); errors.push('FileType');
toastr.error(TAPi18n.__('error-invalid-file-type')); toastr.error(TAPi18n.__('error-invalid-file-type'));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment