# Rails 3: Get the original filename from file uploads

**URL:** <https://www.ruby-forum.com/t/rails-3-get-the-original-filename-from-file-uploads/188312>\
**Category:** Rails\
**Created:** [May 10, 2010, 4:58am UTC](https://www.ruby-forum.com/t/rails-3-get-the-original-filename-from-file-uploads/188312 "2010-05-10T04:58:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![builtbysimple](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/aca169/32.png) [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Post date:** [May 10, 2010, 4:58am UTC](https://www.ruby-forum.com/t/rails-3-get-the-original-filename-from-file-uploads/188312/1 "2010-05-10T04:58:22Z")

</div>

Hi all,

I am currently using Rails 3 and I am using it to upload a file. How  
do I get the original filename using Rails 3? Because when I use  
File.basename(), what I get is RackFileUpload and not the original  
filename. Has anyone done this before and can share it with us here?

Kind regards,  
Joshua

–  
[http://twitter.com/scrum8](http://twitter.com/scrum8)
