Комментарии:
Hey Amitav, great job! Do you have the code of this tutorial somewhere on Github or elsewhere? Thanks
ОтветитьThere is a bug in this lesson : when you upload an image and click it, it will open in the same window. Should be like the other pictures in a new window. You forgot to append "target="_blank" in the javascript.
Ответитьadd at the end of the page gallery-view.blade.php
<script> var baseUrl = "{{ asset('/') }}"; </script>
The images are not being uploaded automatically by javascript. Can someone please help? This is my code
Dropzone.options.addImages = {
maxFilesize: 2,
acceptedFiles: 'image/*',
success: function(file, response) {
if(file.status == 'success'){
handleDropzoneFileUpload.handleSuccess(response);
} else {
handleDropzoneFileUpload.handleError(response);
}
}
};
var handleDropzoneFileUpload = {
handleError: function(response) {
console.log(response);
},
handleSuccess: function(response) {
var imageList = $('#gallery-images ul');
var imageSrc = baseUrl + '/' + response.file_path;
$(imageList).append('<li><a href="' + imageSrc + '"><img src="' + imageSrc + '"></a></li>');
}
};
$(document).ready(function() {
});
Which can be the cause that i can not show the response variable in the console? Is showing like empty when i print it on the console.
Thanks a lot, your videos help me a lot!
You need to define the baseUrl variable inside master blade. Once that is done, we can use that variable throughout our JavaScript code.
ОтветитьUncaught ReferenceError: baseUrl is not defined What can I do? I
ОтветитьI make myself my admin panel , but I spend a lot of time I finished my dashboard . Previously I wish I saw this video . I need to learn JavaScript . Realy great video tutorial +Amitav Roy respect !
Ответитьplease upload next video as soon as possible....
ОтветитьThank you for the tutorial.
It would be really cool if you can show us how the delete one of the images in the galley using an Ajax call
awesome video, How could we set condition maximum limit of images for a gallery ? I want to set limit 4 images for each gallery.
Ответить