简体   繁体   中英

Uploading folders/multiple files using Paperclip ( Rails gem )

I'm using paperclip to upload some attachments to my application. This works fine, but i'm stuck with the following: My client wants a photo album on the website, so he needs to be able to select multiple fields or a folder when uploading batches of photo's. I found a screencast called 'multiple file selection with paperclip', but that one, and many others, just add another file field to the form when the first file added. This way, the user still has to add every file separately. I want to be able to upload a whole batch with one click. After my second googling session I found some guys who let the user zip the file and upload it. They then unpack and loop through the file. Is this the only way to go about this? and do you need a gem to upload and unpack zip files?

The only other way i can think of is using a Java Applet or maybe Flash. I've only seen this functionality implemented with Applets to date.

UPDATE: Why not use a handy JQuery Plugin: http://www.fyneworks.com/jquery/multiple-file-upload

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