in reply to Re: Upload file- Ajax+Perl
in thread Upload file- Ajax+Perl

Finally, this worked for me. But why CGI is not used here? Does that mean I need to send all the other data via http headers, for example if I send a form with multiple fields and files?

Replies are listed 'Best First'.
Re^3: Upload file- Ajax+Perl
by Anonymous Monk on Jul 10, 2016 at 20:19 UTC

    Finally, this worked for me. But why CGI is not used here?

    Because the guy who wrote it is naive/ignorant.

    Does that mean I need to send all the other data via http headers, for example if I send a form with multiple fields and files?

    No. If your server program is running under CGI use CGI module for getting at the data.

      Right, the body of the request can be accessed via CGI. I used $cgi->param('POSTDATA') to save the uploaded file.