开发者

Can paperclip be used for off-site attachments

开发者 https://www.devze.com 2023-03-19 11:36 出处:网络
Basically, I want to import a number of URL of pictures from around the web and manage them in my app. I also let the user upload some files, and I use paperclip to manage the upload and generate thum

Basically, I want to import a number of URL of pictures from around the web and manage them in my app. I also let the user upload some files, and I use paperclip to manage the upload and generate thumbnails.

My question is: can I use paperclip just to generate (and store) thumbnails for pictures whose originals are stored elsewhere (flickr, picasa, wherever)?

If this isn't possible at all, what would be a good alternative开发者_StackOverflow?


I don't believe paperclip offers this functionality however carrierwave is a good alternative which does.

To scale the original image, ie. not store two sizes you can do this:

process :resize_to_limit => [400, 400]  

Storing the original url would be quite simple by adding a field to the model with the uploader.

0

精彩评论

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