--- "Rafala, Michael" <[EMAIL PROTECTED]> wrote: > I want to call my file upload cgi program and upload a file via a URL rather > than using a Form on a Web page. > > My script works via the upload form, which looks like this: > > <FORM action=/cgi-bin/tables.cgi method=post encType=multipart/form-data> > <INPUT type=file maxLength=80 size=30 name=upload_file></TD></TR> > <INPUT type=submit value=Upload name=.submit> > </FORM> > > But when I try this URL: > > http:\\myServer\cgi-bin\upload.cgi?upload_file="c:\myfile" > > the script gets the filepath, but can't read the original file. I'm sure it > has to do with the get/post thing, but I can't figure out how to get around > it. Is there something I can do to either the URL or the script to > accomplish this? Is it even possible? > > mike rafala > rafala m at cadmus com
This is because, if you use the URL, you are automatically using a GET request with enctype="x-www-form-urlencoded". File uploads only work with a POST request, enctype="multipart/form-data". This is a common cause of bugs in file upload routines. Cheers, Curtis "Ovid" Poe ===== "Ovid" on http://www.perlmonks.org/ Someone asked me how to count to 10 in Perl: push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//; shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]