Uploading image from web url

22 views
Skip to first unread message

senihele

unread,
Jun 14, 2008, 4:01:38 PM6/14/08
to Paperclip Plugin
Hey everyone,

Anyone know how I could use a url image reference instead of uploading
from the file system? Ultimately what I am trying to do is allow
someone to imput a url, scrape the url for possible images, then have
someone select an image to upload (with paperclip), in the style of
facebook or digg. I've been looking into a few different ways to
handle the scraping (any suggestions on this also appreciated), but
first step seems to be to get paperclip working with an image's url
first.

Thanks so much!

Trevor Turk

unread,
Jun 14, 2008, 4:27:51 PM6/14/08
to Paperclip Plugin
On Jun 14, 3:01 pm, senihele <mjmmayern...@gmail.com> wrote:
> Anyone know how I could use a url image reference instead of uploading
> from the file system?

I'm doing something like this with attachment_fu, but I imagine it
would work for paperclip as well...?

http://github.com/trevorturk/el-dorado/tree/master/lib/attachment_fu_extensions.rb

Check out the uploads controller and views for a little more info.
Basically, this makes a "url" attribute that can serve to handle
uploads. I'll post back here if/when I switch this over to use
paperclip, but I think you should be able to sort it out given this
head start.
Reply all
Reply to author
Forward
0 new messages