# Upload File Using Form

**URL:** <https://www.ruby-forum.com/t/upload-file-using-form/155735>\
**Category:** Rails\
**Created:** [December 16, 2008, 7:14am UTC](https://www.ruby-forum.com/t/upload-file-using-form/155735 "2008-12-16T07:14:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdhale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ba0ec/32.png) [@jdhale](https://www.ruby-forum.com/u/jdhale)\
**Post date:** [December 16, 2008, 7:14am UTC](https://www.ruby-forum.com/t/upload-file-using-form/155735/1 "2008-12-16T07:14:19Z")

</div>

I am trying to upload a CSV file through a form, process it, then input  
the values in the file it into my database. So first step, I need to  
upload the file. I created the form, uploaded a test file but I am  
having trouble accessing the file in my controller. I can access a hash  
but all contains is the original filename of the file. I guess my  
question is how can I access this file and save it so that I can later  
pass it to a CSV processing function. I assume the file is uploaded to  
some sort of temp file? I am new at rails but I have accomplished  
uploading and saving files in PHP before. Any help would be great.

Thanks,

Jason

---

<div class="post-metadata">

**Author:** ![jdhale](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7ba0ec/32.png) [@jdhale](https://www.ruby-forum.com/u/jdhale)\
**Post date:** [December 16, 2008, 9:06am UTC](https://www.ruby-forum.com/t/upload-file-using-form/155735/2 "2008-12-16T09:06:44Z")

</div>

see attachment\_fu
