Re: Urgent Help needed with Post method file upload
Gisle Aas <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.lwp |
|---|---|
| Message-ID | <[email protected]> |
"Eric Langheinrich" <[email protected]> writes: > Okay, so in the useragent, I pass the filename as an array reference > [$task_add_datakey] what actually gets the contents of the file and > posts them? The form_data() function in the HTTP::Request::Common module reads the content. > Is there another way to do it? I would recommend that you first figure out what the problem is before you start looking for another way. As I said, the file data is already read in binary mode, so that's certainly not the problem. > Am I better off opening a raw socket > and writing the headers and the data myself? My concern is that to get > the raw binary to write properly in the first place, I had to run > binmode FILEHANDLE ":raw" on the file handle that I was writing > to. From what I've read, I would need to do that on the read of the > file contents as well in order to properly get the data. Is the > library setup to handle raw binary data? Regards, Gisle