[Nitro] Stupid file upload question

Robert Mela rob at robmela.com
Tue Sep 25 23:13:52 EDT 2007


I've created a form ( using nforms.rb ) for doing a file upload.   I 
would like the saved file name on the server to have the same basename 
as the user's original file.  However, all I see in the uploaded data is 
the file contents.

Is there a way, w/o JavaScript, to capture the user's original file name 
in the post params?

Thanks in advance.

 #{form :action => "#{R :save}", :method => :post, 
:enctype=>'multipart/form-data' do |f|
    f.select_file :name => 'input_file' # file data accessed server-side as
                                        # @context.post_params['input_file']
    f.submit 'Save'
  end}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rob.vcf
Type: text/x-vcard
Size: 116 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070925/116aad20/attachment.vcf 


More information about the Nitro-general mailing list