# Newbie: Saving file from a URL into DB

**URL:** <https://www.ruby-forum.com/t/newbie-saving-file-from-a-url-into-db/55754>\
**Category:** Rails\
**Created:** [March 23, 2006, 4:46pm UTC](https://www.ruby-forum.com/t/newbie-saving-file-from-a-url-into-db/55754 "2006-03-23T16:46:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahadewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Post date:** [March 23, 2006, 4:46pm UTC](https://www.ruby-forum.com/t/newbie-saving-file-from-a-url-into-db/55754/1 "2006-03-23T16:46:22Z")

</div>

Hi all,

I’m just starting to learn RoR, and would like to ask a question.  
I know that we can ‘upload’ file from local machine and save it to a  
database. Now, say I have a photo which I store in other website (for  
example Flickr). This photo obviously has a URL pointing to it, e.g.  
[http://www.flickr.com/username/photoname.jpg](http://www.flickr.com/username/photoname.jpg).  
How can I ‘save’ this photo/file into my RoR application’s database ?

Thanks a lot for your help,  
Chris

---

<div class="post-metadata">

**Author:** ![mahadewa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9e8a1a/32.png) [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Post date:** [March 23, 2006, 5:23pm UTC](https://www.ruby-forum.com/t/newbie-saving-file-from-a-url-into-db/55754/2 "2006-03-23T17:23:01Z")

</div>

Have you looked at file upload code and considered if you can hack it to  
take input from a url instead of from the local file store?

Tim C.
