On 6/8/05, Mark J. Dulcey <[EMAIL PROTECTED]> wrote: > Alex Brelsfoard wrote: > > I know I asked a similar question a while back, but I'm compelled to try > > again. > > > > I have an existing script, not using CGI to take in parameters handed to the > > script. I would now like to have this script upload a file to the server, > > but > > not be forced to convert the entire file to using CGI. > > > Any suggestions of how to upload an image similarly without having to > > rewrite > > the rest of my code? > > You're doing HTTP upload, so you're going to need some sort of module to > do that. CGI.pm is certainly the most common one. A quick search of CPAN > didn't turn up any obvious candidates to replace it, but maybe someone > out there will know of one.
CGI::Simple is also out there if you don't want to use the HTML generation. (Usually using the HTML generation is a bad idea, but there are some simple tasks for which it makes sense.) However that would not solve the original problem, which is how to add support for uploads without having to rewrite the parts of the script that does its own form processing. (If past experience is anything to judge from, it probably does its own form processing very badly.) But this brings to mind an alternate solution. Which is to write a few functions that present the interface that the old code expects using CGI under the hood to do them, then remove the old form processing code. Cheers, Ben _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm