Hi, I am using Laravel and your template to make a website. However, I am facing issues when performing a drap drop. I am using the component as exampled in form-elements.html. It works fine when I manually select a file. But when I drag drop, Laravel does not detect any file input. Can you please let me know why? Thanks. Below is my javascript code it it helps:
`function show() {
@if(!empty($user->avatar))
$('.restore-group').show('fast');
@endif
}
function populate() {
@if(!empty($user->avatar))
avatar.ace_file_input('show_file_list', [
{type: 'image', name: '{{decrypt($user->avatar)}}', path: '{{url('file/avatar/small')}}'}
]);
@endif
}
var avatar = $('#avatar');
avatar.ace_file_input({
style: 'well',
btn_change: null,
droppable: true,
thumbnail: 'small',
btn_choose: "Drop images here or click to choose",
no_icon: "ace-icon fa fa-picture-o",
allowExt: ["jpeg", "jpg", "png", "gif", "bmp"],
allowMime: ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/bmp"],
before_remove: function () {
show();
$('#_action').val('removed');
return true;
},
before_change: function () {
show();
$('#_action').val('changed');
return true;
}
}).on('change', function () {
console.log($(this).data('ace_input_files'));
console.log($(this).data('ace_input_method'));
});`
Hi, I am using Laravel and your template to make a website. However, I am facing issues when performing a drap drop. I am using the component as exampled in
form-elements.html
. It works fine when I manually select a file. But when I drag drop, Laravel does not detect any file input. Can you please let me know why? Thanks. Below is my javascript code it it helps: