Laravel Gallery App - 7 - Implementing Dropzone

Laravel Gallery App - 7 - Implementing Dropzone

Amitav Roy

8 лет назад

9,305 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Armin Schmidtke
Armin Schmidtke - 05.12.2016 19:29

Hey Amitav, great job! Do you have the code of this tutorial somewhere on Github or elsewhere? Thanks

Ответить
Rob Baartwijk
Rob Baartwijk - 24.09.2016 21:16

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.

Ответить
John Dou
John Dou - 07.06.2016 17:06

add at the end of the page gallery-view.blade.php
<script> var baseUrl = "{{ asset('/') }}"; </script>

Ответить
Rasheed Russell
Rasheed Russell - 20.12.2015 21:34

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() {

});

Ответить
Jeremias Araujo
Jeremias Araujo - 19.12.2015 23:01

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!

Ответить
Amitav Roy
Amitav Roy - 07.10.2015 04:26

You need to define the baseUrl variable inside master blade. Once that is done, we can use that variable throughout our JavaScript code.

Ответить
sKan
sKan - 06.10.2015 21:34

Uncaught ReferenceError: baseUrl is not defined What can I do? I

Ответить
Umut Yerebakmaz
Umut Yerebakmaz - 28.09.2015 12:06

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 !

Ответить
Ashish Rastogi
Ashish Rastogi - 03.09.2015 14:08

please upload next video as soon as possible....

Ответить
Horia D
Horia D - 28.08.2015 23:25

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

Ответить
Ashish Rastogi
Ashish Rastogi - 26.08.2015 09:49

awesome video, How could we set condition maximum limit of images for a gallery ? I want to set limit 4 images for each gallery.

Ответить