开发者

bulk image upload - Rails3

开发者 https://www.devze.com 2023-01-28 01:46 出处:网络
I have a requirement of bulk uploading images. More precisely, I want to upload all the imagesfor a web site (static images like back ground, logo, corner images , images required by css etc..)

I have a requirement of bulk uploading images. More precisely, I want to upload all the images for a web site (static images like back ground, logo, corner images , images required by css etc..)

As I think uploading these images one after another is not looks l开发者_开发技巧ike quite practical (As it might have 60-70 images). So my questions are..

  1. What is the standard way of doing these kind of a staff ?
  2. Is it possible to let users to upload a .zip (images) file and extract it from the server side.
  3. If 2 is possible, can i do it with Rails3 and standard shared host

thanks in advance

cheers

sameera


1) Assuming you are talking about allowing bulk uploads from the website not as a rake task the typical way for handling multiple uploads is to use Uploadify / SWFUpload for the frontend along with a gem such as Paperclip to handle the images on the Rails side.

A google search for "paperclip uploadify" or "paperclip swfupload" should give you some good reference material.

2) It is certainly possible to do this, I've mostly worked with it the other way around to offer zipped archives of files for download but processing zips and working with the included files is definitely do-able

3) The suggested methods I gave for (1) above work just fine on Rails 3 and I can't see any reason they wouldn't work on shared hosting. That approach will however need some additional work for environments such as Heroku which have no or transient direct storage

0

精彩评论

暂无评论...
验证码 换一张
取 消