Use the filedrop jQuery plugin to allow for drag & drop uploading
This commit is contained in:
parent
5a4ab521b3
commit
29f6b52dff
|
@ -37,6 +37,16 @@ $(document).ready(function() {
|
|||
});
|
||||
};
|
||||
|
||||
// For drag & drop file uploading via the filedrop jQuery plugin and HTML5.
|
||||
$("body").filedrop({ url: '/draggables',
|
||||
paramname: 'file',
|
||||
data: { type: 'dnd' },
|
||||
maxfiles: 1,
|
||||
maxfilesize: 50,
|
||||
error: function(err, file) { console.log(err, file); },
|
||||
afterAll: function() { window.location.reload(true) }
|
||||
});
|
||||
|
||||
// Populate the canvas with the draggables.
|
||||
$.get("draggables", function(data) {
|
||||
$.each(data, function(drag_id, drag_info) {
|
||||
|
|
Reference in a new issue