# File path of uploaded file

**URL:** <https://www.ruby-forum.com/t/file-path-of-uploaded-file/143520>\
**Category:** Rails\
**Created:** [July 19, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/file-path-of-uploaded-file/143520 "2008-07-19T22:52:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 19, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/file-path-of-uploaded-file/143520/1 "2008-07-19T22:52:42Z")

</div>

Where is the file after a file has been uploaded? Is it stored in /tmp  
or in rails\_app/tmp or? I need to get the file path after it has been  
submitted.

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 20, 2008, 12:34pm UTC](https://www.ruby-forum.com/t/file-path-of-uploaded-file/143520/2 "2008-07-20T12:34:28Z")

</div>

On 19 Jul 2008, at 21:52, Pål Bergström wrote:

> Where is the file after a file has been uploaded? Is it stored in /tmp  
> or in rails\_app/tmp or? I need to get the file path after it has been  
> submitted.

I wouldn’t count on it being anywhere in particular (especially as  
those sorts of location frequently get wiped).  
Small uploads might not be persisted as a file at all. All you should  
care about is that the params your controller gets include something  
you can call read on. From there store the file wherever you want to.

Fred
