I’m new to ruby and rails and have implemented a multiple image upload
using the attachment_fu plugin with great struggle 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?
I’m new to ruby and rails and have implemented a multiple image upload
using the attachment_fu plugin with great struggle 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?
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).
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.
Looks like a great application just need to figure out how to
integrate it with ruby on rails. I’ll look into this.
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).
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.
I have a problem that I’m working in Linux, hence flash is definite no.
Any other suggestions? I have got an upload working see my other post Multiple upload using attachement fu - Rails - Ruby-Forum, but am looking to enhance
it.
Regards
Rajeev A.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.