in reply to Re: How can I upload a file using HTTP POST with Content-Type=multipart/form-data?
in thread How can I upload a file using HTTP POST with Content-Type=multipart/form-data?
Still no reason to write the code yourself. Remember... LWP has had many many man-years of coding put into it. Don't reinvent the wheel.If you set the $DYNAMIC_FILE_UPLOAD variable (exportable) to some TRUE value, then you get back a request object with a subroutine closure as the con- tent attribute. This subroutine will read the content of any files on demand and return it in suitable chunks. This allow you to upload arbitrary big files without using lots of memory. You can even upload infinite files like /dev/audio if you wish. Another difference is that there will be no Content-Length header defined for the request if you use this fea- ture. Not all servers (or server applications) like this.
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: Answer: How can I upload a file using HTTP POST with Content-Type=multipart/form-data?
by bhess (Initiate) on Sep 19, 2000 at 15:14 UTC | |
by Jouke (Curate) on Sep 19, 2000 at 16:13 UTC | |
by Anonymous Monk on Dec 30, 2004 at 04:43 UTC |