in reply to Re: Re: (nrd) LWP || HTML:: Request and Javascripts
in thread LWP || HTML:: Request and Javascripts

OK, same node, different question:
I need now to upload a file: that is, I have an input tag, with the "file" type attribute.
The question being, how do I effectively upload the file? obiviously, if I enter just the path to the file, it won't work... (didn't try though, i'll do right away, what I tried was posting the whole file content)

  • Comment on Re: Re: Re: (nrd) LWP || HTML:: Request and Javascripts

Replies are listed 'Best First'.
Re: ... LWP || HTML:: Request and Javascripts
by dingus (Friar) on Nov 05, 2002 at 17:37 UTC
    I need now to upload a file: that is, I have an input tag, with the "file" type attribute.
    The question being, how do I effectively upload the file?

    See HTTP::Request::Common dcoumentation
    You may also want to study the lwp cookbook and all the other LWP documentation.

    Dingus


    Enter any 47-digit prime number to continue.
Re: Re: Re: Re: (nrd) LWP || HTML:: Request and Javascripts
by Sihal (Pilgrim) on Nov 06, 2002 at 08:36 UTC
    Well I had a quick look at it yesterday before leaving, didn't find anything. I'll have a look right now, thanx.
Re: Re: Re: Re: (nrd) LWP || HTML:: Request and Javascripts
by Sihal (Pilgrim) on Nov 06, 2002 at 08:41 UTC
    OK, this is how to do it.
    POST 'http://www.perl.org/survey.cgi', Content_Type => 'form-data', Content => [ name => 'Gisle Aas', email => 'gisle@aas.no', gender => 'M', born => '1964', init => ["$ENV{HOME}/.profile"], ]
    Sorry I didn't saw it yesterday, went too fast on it, didn't notice...
    All my apologies.