Hello,
Is there any feature in webrick using which we can upload our files
directly. I am talking about the files which are submitted using
tag.
Thanks
Hello,
Is there any feature in webrick using which we can upload our files
directly. I am talking about the files which are submitted using
tag.
Thanks
Can anyone help me on this ?
On 11/4/06, name pipe [email protected] wrote:
Can anyone help me on this ?
On 11/3/06, name pipe [email protected] wrote:
Hello,
Is there any feature in webrick using which we can upload our files
directly. I am talking about the files which are submitted using
tag.Thanks
Try using cgi lib, http://ruby-doc.org/stdlib/libdoc/cgi/rdoc/index.html
Get multipart form values
require “cgi”
cgi = CGI.new
value = cgi[‘field_name’] # <== value string for ‘field_name’
value.read # <== body of value
value.local_path # <== path to local file of value
value.original_filename # <== original filename of value
value.content_type # <== content_type of value
and value has StringIO or Tempfile class methods.
Now you have to figure out how to connect those two
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs