Greetings, I have a method that processes an uploaded file, manages content_type, and a few other things. How would I go about getting the filename of the uploaded file WITHOUT using javascript on the client side to send it through the form??? LiveHTTPHeaders sends the filename with ''Content_Disposition''. Looking through the API of CGI.rb, I still could not find an answer on how to capture the original filename from the client. Thanks in advance. David --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
i believe there is an "original_filename" object that you can call on your file object. file_name = my_file.original_filename hope that helps. On Jun 22, 9:12 am, DavidB <davidbad...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Greetings, > I have a method that processes an uploaded file, manages content_type, > and a few other things. How would I go about getting the filename of > the uploaded file WITHOUT using javascript on the client side to send > it through the form??? > > LiveHTTPHeaders sends the filename with ''Content_Disposition''. Looking > through the API of CGI.rb, I still could not find an answer on how to > capture the original filename from the client. > > Thanks in advance. > David--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks-that is precisely what I was looking for. Next time, I will comb the docs more carefully. THanks again, Josh. David On Jun 22, 9:42 am, Josh <jjkie...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i believe there is an "original_filename" object that you can call on > your file object. > > file_name = my_file.original_filename > > hope that helps. > > On Jun 22, 9:12 am, DavidB <davidbad...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Greetings, > > I have a method that processes an uploaded file, manages content_type, > > and a few other things. How would I go about getting the filename of > > the uploaded file WITHOUT using javascript on the client side to send > > it through the form??? > > > LiveHTTPHeaders sends the filename with ''Content_Disposition''. Looking > > through the API of CGI.rb, I still could not find an answer on how to > > capture the original filename from the client. > > > Thanks in advance. > > David--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---