Hi, does someone has an tutorial for file-upload that works with rails 2.3.2 and that DON''T stores data in a database? I want to: - upload a text-file - do something with the file - put a link for download on the page Regards
Hi , Ronny For file uploading just refer this link . http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm Thanks , Dharmdip -- Posted via http://www.ruby-forum.com/.
Dharmdip Rathod schrieb:> Hi , Ronny > > For file uploading just refer this link . > > http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm > > Thanks , > Dharmdip >i have found this tut, but like i said: name = upload[''datafile''].original_filename doesn''t work for me
Hi , Ronny Ok , the path for file browsing is passing wrong , the path in data file is wrong .please debug datafile path . -- Posted via http://www.ruby-forum.com/.
Either of these will work: http://www.jumbabox.com/2008/06/attachment_fu-tutorial/ http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/ On Jun 18, 1:23 pm, Ronny Fauth <jadefalk...-dcz5jOA4WtfWcxk1g5Tc3IQuADTiUCJX@public.gmane.org> wrote:> Hi, does someone has an tutorial for file-upload that works with rails > 2.3.2 and that DON''T stores data in a database? > > I want to: > > - upload a text-file > - do something with the file > - put a link for download on the page > > Regards
On Jun 18, 7:06 pm, Ronny Fauth <jadefalk...-dcz5jOA4WtfWcxk1g5Tc3IQuADTiUCJX@public.gmane.org> wrote:> name = upload[''datafile''].original_filename > > doesn''t work for meHave you made sure to set :enctype => ''multipart/form-data'' in your form? -Matt
Matthew MacLeod schrieb:> On Jun 18, 7:06 pm, Ronny Fauth <jadefalk...-dcz5jOA4WtfWcxk1g5Tc3IQuADTiUCJX@public.gmane.org> > wrote: > >> name = upload[''datafile''].original_filename >> >> doesn''t work for me >> > > Have you made sure to set :enctype => ''multipart/form-data'' in your > form? > > -Matt >i _thought_ i had, but the syntax of the form-tag did something else <% form_tag( { :action => ''uploadfile'' }, :multipart => true ) do %> -----> works now <% form_tag :action => ''uploadfile'' , :multipart => true do %> -----> do not work (upload?multipart=true) <% form_tag( { :action => ''uploadfile'' }, {:multipart => true} ) do %> -----> do not work (upload?multipart=true) <% form_tag( { :action => ''uploadfile'' }, : html => {:multipart => true} ) do %> -----> do not work (upload?multipart=true) strange thing...