Fix an issue when adding new media

This commit is contained in:
Thomas 2020-05-01 18:44:41 +02:00
parent 65acc0295a
commit eed599f615

View file

@ -414,7 +414,7 @@
var content;
content = ' <div class="row" id="media_container_'+data.id+'">\n' +
' <div class="col-md-4">\n' +
' <img src="'+data.preview_url+'" style="width:100%;max-width:400px;" id="media_preview_'+data.id+'"/>\n' +
' <img src="'+data.preview_url+'" style="width:100%;max-width:200px;" id="media_preview_'+data.id+'"/>\n' +
' </div>\n' +
' <div class="col-md-6">\n' +
' <textarea name="media_description_'+data.id+'" class="form-control"></textarea>\n' +
@ -428,11 +428,11 @@
' </div>\n' +
' </div>'
$('#media_container').html($('#media_container').html() + content);
$('#media_container').append($(content));
},
url: 'https://{{ instance }}/api/v1/media',
acceptFileTypes: /(\.|\/)(gif|jpe?g|png|mp4|mp3)$/i
acceptFileTypes: /(\.|\/)(gif|jpe?g|apng|png|mp4|mp3|avi|mov|webm|wmv|flv|wav|ogg)$/i
});
// Enable iframe cross-domain access via redirect option: