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

pull/11766/head^2
フィンメーラ 8 years ago committed by Gabriel Engel
parent 94ad01f9df
commit 6a52f62351
  1. 2
      packages/rocketchat-custom-sounds/client/admin/soundEdit.html
  2. 2
      packages/rocketchat-custom-sounds/client/admin/soundEdit.js

@ -13,7 +13,7 @@
</div>
<div class="input-line">
<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>
<nav>
<button class='button button-block cancel' type="button"><span>{{_ "Cancel"}}</span></button>

@ -93,7 +93,7 @@ Template.soundEdit.onCreated(function() {
}
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');
toastr.error(TAPi18n.__('error-invalid-file-type'));
}

Loading…
Cancel
Save