Pål Bergström | 19 Jul 22:52

File path of uploaded file


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.
--

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Frederick Cheung | 20 Jul 12:33

Re: File path of uploaded file


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

>
> -- 
> Posted via http://www.ruby-forum.com/.
>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

(Continue reading)


Gmane