Thanks Timothy. However, I'm not sure if I understand... constraining to html? I said I wanted to avoid html and the need to supply the path of the file via form. Below is my short script; all I want to do is to be able to specify the path of the file within the script, instead of waiting for the input from the form.
#!/usr/bin/perl -W use DBI; use CGI ':standard'; print "Content-type:text/html\n\n"; my $file = param('uploadfile'); #(my $file = "C:\folder\filename.html"; - doesn't work ) open(UPLOAD, ">../employees/schedule.html") || Error(); my ($data,$length,$chunk); while ($chunk = read ($file, $data, 1024)){ print UPLOAD $data; } close(UPLOAD); sub Error { print "Couldn't open temporary file: $!"; exit;} ----- Original Message ----- From: "Timothy Johnson" <[EMAIL PROTECTED]> To: "'Mariusz '" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, March 12, 2002 12:18 AM Subject: RE: uploading without using forms :( > > Are you uploading this file to somewhere outside of your LAN/WAN? I guess > what I'm wondering is, why are you constraining yourself to using http? > > -----Original Message----- > From: Mariusz > To: [EMAIL PROTECTED] > Sent: 3/11/02 6:48 PM > Subject: uploading without using forms :( > > Thanks for your suggestion, Mathew. However, the problem I have is how > to > avoid using any form (html) all together. > This is what I'm trying to accomplish: > > 1. There is a file in a given location ( e.g. C:\folder\file.html). > 2. I call the script via http address. > 3. The script uploads the file.html and "knows" already where to look > for > it. > > Mariusz > > > ----- Original Message ----- > From: "Matthew Harrison" <[EMAIL PROTECTED]> > To: "Mariusz" <[EMAIL PROTECTED]> > Sent: Monday, March 11, 2002 8:04 PM > Subject: Re: uploading without using forms > > > > a hidden field on the form? > > > > On Tuesday 12 Mar 2002 12:53 am, you wrote: > > > Is there a way to upload a file without being forced to provide the > > > directory path through the "param()" function? I basically want > people > to > > > click on the button (within Access db) that would automatically > upload > > > their file and post it onto the website. I basically created a macro > that > > > opens a location www.domainname.com/upload.cgi but the problem is > that I > > > don't know how to include the location of the file being uploaded in > the > > > script (since the location of the file will always be the same) so > the > > > user is not asked to provide it. > > > > > > Thank you, > > > Mariusz > > > > -- > > Matthew Harrison > > Internet/Network Services Administrator > > Peanut-Butter Cheesecake Hosting Services > > Genstate > > www.peanutbuttercheesecake.co.uk > > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -------------------------------------------------------------------------- ------ > This email may contain confidential and privileged > material for the sole use of the intended recipient. > If you are not the intended recipient, please contact > the sender and delete all copies. > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]