I’m building a gallery website in Rails and I’d like to batch-add
to a gallery. I’ve developed a similar application in PHP before and
found two ways to do that:
- Archive the images in a zip file and upload them through a web form;
- Set up a FTP account for a directory in which image files for the
to-be registered gallery will be placed. In the moment the admin
the new gallery, the script will look into this directory to get the
Once the images are collected, the script would then create a non-public
folder with the name of the gallery and with three subdirs: /hires,
/thumb. The hi-res images go into hires, then these same images are
processed by imagemagick and re-dimensioned into a lower-resolution
image to be shown in the website. The same process happens for the
The images shouldn’t be directly accessible by the webserver, they
served by a rails script (controller?) since the hi-res ones will
additional authentication steps in order to be downloaded.
This php app was written in Cake (a Rails-like framework) and what I did
to put the image processing methods inside a component and then a
ImagesController would have a privated method to convert everything
the web interface.
I’m not sure on what would be the best way to implement these in Rails.
Maybe a web form that would call a rake task that would in turn execute
Any suggestions would be greatly appreciated!