# File Uploading using Rails

**URL:** <https://www.ruby-forum.com/t/file-uploading-using-rails/128921>\
**Category:** Rails\
**Created:** [February 12, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/file-uploading-using-rails/128921 "2008-02-12T18:25:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcmohd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@mcmohd](https://www.ruby-forum.com/u/mcmohd)\
**Post date:** [February 12, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/file-uploading-using-rails/128921/1 "2008-02-12T18:25:43Z")

</div>

Here is one tutorial for the beginners to understand how to upload a  
file using Rails.

> **[Ruby on Rails - File Uploading](http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm)**
>
> Ruby on Rails File Uploading - You may have a requirement in which you want your site visitors to upload a file on your server. Rails makes it very easy to handle this requirement. Now we will proceed with a simple and small Rails project.

If you like this tutorial then please send me your feedback.

Thanks  
Mohtashim

---

<div class="post-metadata">

**Author:** ![mcmohd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@mcmohd](https://www.ruby-forum.com/u/mcmohd)\
**Post date:** [February 12, 2008, 8:59pm UTC](https://www.ruby-forum.com/t/file-uploading-using-rails/128921/2 "2008-02-12T20:59:27Z")

</div>

You are going to have a problem if you use that in a real app and use  
Capistrano.

I suggest adding a note at the bottom, that explains that public/data is  
going to be overwritten every time they deploy their app unless  
public/data is under version control. If public/data is under version  
control, then every time they deploy they are going to overwrite the  
uploads to the production site, with the ones from the development  
server.

See:  
[http://almosteffortless.com/2007/03/25/working-with-attachment\_fu/](http://almosteffortless.com/2007/03/25/working-with-attachment_fu/)  
for more information. That page saved my life when I started using  
attachment\_fu.

---

<div class="post-metadata">

**Author:** ![mcmohd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@mcmohd](https://www.ruby-forum.com/u/mcmohd)\
**Post date:** [February 13, 2008, 8:09am UTC](https://www.ruby-forum.com/t/file-uploading-using-rails/128921/3 "2008-02-13T08:09:29Z")

</div>

Chris G. wrote:

> You are going to have a problem if you use that in a real app and use  
> Capistrano.
> 
> I suggest adding a note at the bottom, that explains that public/data is  
> going to be overwritten every time they deploy their app unless  
> public/data is under version control. If public/data is under version  
> control, then every time they deploy they are going to overwrite the  
> uploads to the production site, with the ones from the development  
> server.
> 
> See:  
> [http://almosteffortless.com/2007/03/25/working-with-attachment\_fu/](http://almosteffortless.com/2007/03/25/working-with-attachment_fu/)  
> for more information. That page saved my life when I started using  
> attachment\_fu.

Hi Chris,

I’m sorry, I could not understand your concern here.

Please explain it properly and I will take your suggestion.

Regards  
Mohtashim
