Does anyone know how to open a file like the below? "Filedata"=>#<File:/var/folders/9D/9D8PtWGBFgmSvF-Ue+uD9++++TI/-Tmp-/RackMultipart20110121-7108-6aqdij-0>} file_column is used to upload a document and i need to open it just with the information above, Any ideas? JB -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Should be able to use .tempfile() Garrett Lancaster> ------------------------------------------------------------------------ > > John Butler <mailto:lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > January 21, 2011 8:50 AM > > > Does anyone know how to open a file like the below? > > "Filedata"=>#<File:/var/folders/9D/9D8PtWGBFgmSvF-Ue+uD9++++TI/-Tmp-/RackMultipart20110121-7108-6aqdij-0>} > > file_column is used to upload a document and i need to open it just with > the information above, > > Any ideas? > > JB >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Garrett Lancaster wrote in post #976554:> Should be able to use .tempfile() > > Garrett Lancasterthanks, have that working now. What i really need is to be able to add that file to a model in the controller, the field is a file column field. I know it generally comes from a form and is saved but in this instance i have the tmp file "Filedata"=>#<File:/var/folders/9D/9D8PtWGBFgmSvF-Ue+uD9++++TI/-Tmp-/RackMultipart20110121-7108-6aqdij-0>} and i need to do some processing first and then add it to the model, any suggestions? JB -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Can you use one of the attachment libraries (like Paperclip)? If not, you might still be able to find some inspiration there.> and i need to do some processing first and then add it to the model, any suggestions?If you''re doing image processing check out ImageMagick (also works with Paperclip) or ImageScience. If you''re doing general file management stuff then Ruby''s modules File, FileUtil, and Tempfile may be relevant. On Jan 21, 11:30 am, John Butler <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> What i really need is to be able to add that file to a model in the > controller, the field is a file column field.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.