Upload images in batch/bulk

Hi,

I'm new to ruby and rails and have implemented a multiple image upload using the attachment_fu plugin with great struggle :slight_smile: I need a feature that enables me to upload images in bulk/batch e.g. hundreds of images. I have had not much luck on finding any sources on this. Ideally I would like to upload images by just simply using ctr-shift to select all the images in a particular folder and upload them. Any suggestions on this or other possible methods on doing this?

Thanks

Use SWFUpload (http://swfupload.mammon.se/). Because it uses Flash, the file selection dialog allows multiple selection, as well as filetype and filesize filtering. Be sure to search the archives for more info on implementing it, because there are a few catches (but once it’s up and running, it’s just fantastic).

Best regards

Peter De Berdt

Use SWFUpload (http://swfupload.mammon.se/). Because it uses Flash, the file selection dialog allows multiple selection, as well as filetype and filesize filtering. Be sure to search the archives for more info on implementing it, because there are a few catches (but once it's up and running, it's just fantastic).

Best regards

Peter De Berdt

Thanks Peter

Looks like a great application just need to figure out how to integrate it with ruby on rails. I'll look into this.

Thanks again

Raj

You can just copy most of the example code. You can rewrite the callbacks to use prototype/scriptaculous (you’ll need to use some basic javascript for this).

A few pointers that may help you down the road:

• If the upload script is in an “authenticated” section of your application (i.e. dependent on the session): http://blog.inquirylabs.com/2006/12/09/getting-the-_session_id-from-swfupload/ You’ll need to pass the session id in the url

• In your method/action that handles the upload, don’t render a result page or redirect at the end of the method, just return a status code or render :nothing => true. You have to use the upload_queue_completed callback to render the result (i.e. show the new images, …)

If you search the archives, you’ll find some code snippets I already posted, this should also provide you with some tips.

Best regards

Peter De Berdt

You may find some additional useful tips here:

http://blog.airbladesoftware.com/2007/8/8/uploading-files-with-swfupload

Regards, Andy Stewart