简体   繁体   中英

Laravel Multiple Image Upload using Ajax

I have been trying to upload multiple images in Laravel 4, using jQuery & Ajax without the page refreshing, with the progress bar, remove button and review (display the uploaded thumbnail where remove deletes it from the DB).

I have taken many approaches, ( http://packalyst.com/packages/package/sukohi/surpass ) (despite following every step, still doesn't work). Another approach I used ( https://gist.github.com/filip-adriginal/bd397c5ec22a5916a966#file-gistfile1-txt ) and tried the jQuery-File-Upload.

I am able to upload multiple images using (using foreach in the Controller):

 {{ Form::file('image[]', array('multiple'=>true)) }}

I have also looked at videos, tutorials and blogs, but they either had partial information or unsolved problems.

If anyone could give me some sample code, or point me in the right direction, that would be great! Thanks everyone for any help, really appreciate it.

try DropzoneJs. I think it is the best upload JS plugin

Howto : AJAX multiple file upload in Laravel is a great tutorial using Dropzone.js , check it. Also take a look at this tutorial Laravel Ajax Multiple Image Upload and Preview which uses Dropzone.js as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM