File upload?

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 .

Thanks , Dharmdip

Dharmdip Rathod schrieb:

Hi , Ronny

For file uploading just refer this link .

Ruby on Rails - File Uploading

Thanks , Dharmdip   

i have found this tut, but like i said:

name = upload['datafile'].original_filename

doesn't work for me

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/

Have you made sure to set :enctype => 'multipart/form-data' in your form?

-Matt

Matthew MacLeod schrieb:

  

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