# File upload

**URL:** <https://www.ruby-forum.com/t/file-upload/119136>\
**Category:** Rails\
**Created:** [November 3, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/file-upload/119136 "2007-11-03T16:38:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arnitak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/2bfe46/32.png) [@arnitak](https://www.ruby-forum.com/u/arnitak)\
**Post date:** [November 3, 2007, 4:38pm UTC](https://www.ruby-forum.com/t/file-upload/119136/1 "2007-11-03T16:38:28Z")

</div>

Hi

I have trouble uploading files with RoR. I followed the examples into  
wiki and I always end up with a stringify\_keys! error. I just want to  
upload a simple file, however it does not work with the example  
presented in the wiki. Can anyone help?

---

<div class="post-metadata">

**Author:** ![arnitak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/2bfe46/32.png) [@arnitak](https://www.ruby-forum.com/u/arnitak)\
**Post date:** [November 3, 2007, 4:44pm UTC](https://www.ruby-forum.com/t/file-upload/119136/2 "2007-11-03T16:44:53Z")

</div>

Here is my view.

# New video

\<%= start\_form\_tag({:action =\> ‘upload’}, {:multipart =\> true}) %\>

\<%= file\_field\_tag “video” %\>  
\<%= text\_field “video”, “description” %\>

\<%= submit\_tag ‘Create’ %\>

\<%= end\_form\_tag %\>

\<%= link\_to ‘Back’, :action =\> ‘list’ %\>

And here is the controller.

def upload  
@video = Video.new(params[:video])  
file = File.new(“testfile.test”, “wr”)  
file = file.read  
file.close

end
