Commit f250ed33 authored by Nicolas Widart's avatar Nicolas Widart

Publishing asset

parent 15fc70a4
$( document ).ready(function() { $( document ).ready(function() {
Dropzone.autoDiscover = false; Dropzone.autoDiscover = false;
var myDropzone = new Dropzone(".dropzone", { var myDropzone = new Dropzone(".dropzone", {
url: '/api/file', url: Asgard.dropzonePostUrl,
autoProcessQueue: true, autoProcessQueue: true,
maxFilesize: maxFilesize, maxFilesize: maxFilesize,
acceptedFiles : acceptedFiles acceptedFiles : acceptedFiles
...@@ -17,7 +17,7 @@ $( document ).ready(function() { ...@@ -17,7 +17,7 @@ $( document ).ready(function() {
} }
}); });
myDropzone.on("error", function(file, errorMessage) { myDropzone.on("error", function(file, errorMessage) {
var html = '<div class="alert alert-danger" role="alert">' + errorMessage.file[0] + '</div>'; var html = '<div class="alert alert-danger" role="alert">' + errorMessage + '</div>';
$('.col-md-12').first().prepend(html); $('.col-md-12').first().prepend(html);
setTimeout(function() { setTimeout(function() {
myDropzone.removeFile(file); myDropzone.removeFile(file);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment