You will need a cgi-perl script that can download the file from the server machine. EX: click on the download link and it will open โsave asโ and allow me to save the file on my local machine.
I created a web page using CGI, using this, I upload the file to the server and run the perl script to convert it to some other format (until I finish). Now I need to return this file (upload back) to the system.
my $filepath='/upload/testing.pm';
print "Content-Type: text/html\n\n";
open("DOWNLOADFILE", "<".$filePath);
while($fileContents = <DOWNLOADFILE>) {
print $fileContents;
}
print "Content-Type: text\n";
print "Content-Disposition: attachment; filename='testing.pm'\n";
print "Content-Description: File to download\n\n";
close DOWNLOADFILE;
Upload the file from my computer (client) to the server computer, where I have a perl script that converts the file to a different format and saves the newly converted file to the ex directory: / upload-> until here I ended up with the script.
. test.pm .