[Nitro] Stupid file upload question

George Moschovitis george.moschovitis at gmail.com
Wed Sep 26 03:11:27 EDT 2007


>
> I've created a form ( using nforms.rb ) for doing a file upload.   I


First of all, nforms.rb is experimental. It will not be part of 0.50.0.

But I like that you are trying to use it, so I can get some constructive
remarks/suggestions about it ;-)

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}


Have you tried:

request[:my_file].original_filename
request[:my_file].content_type
r..].path
r..].local_path

etc?

-g.





-- 
http://gmosx.me.gr
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070926/97ae5375/attachment.html 


More information about the Nitro-general mailing list