Link to home
Start Free TrialLog in
Avatar of microfleet
microfleet

asked on

file upload

Is there a way to have a user choose a file to upload and then have the perl script go get it from the local computer? I don't want to have to use a browser interface. I have a Visual Basic program that allows users to select a file from their computer to upload. The only problem is getting the perl script to upload it without having to deal with the clumsy web browser.
ASKER CERTIFIED SOLUTION
Avatar of khacharn
khacharn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of microfleet
microfleet

ASKER

But upload it how? I know how to use a browser to upload to a perl scipt, but how do I tell the perl script to upload it to itself? Normally, the browser initiates the upload and performs the client end of the process while the perl script handles the server side, but what if there is no browser to deal with; how then can script accept a file for upload?
Once the User has selected the files to be uploaded..you can initiate a perlscript(on the server) which uses the LWP::SIMPLE module to fetch the file from the LOCAL PC..HOW ??
Every computer that logs on to the INTERNET has an IP address.
you can capture that IP address thru any scripting language(javascript eg)
Then you can pass the ip address of the client PC and the pathof the file he wants to upload..as parameters to the perl script on your server..this perlscipt will then use the LWP::SIMPLE module function get to get that file..
sample code
***************************************
Use LWP::Simple;
my filepath = <ARGV[0]>;
my IPadd = <ARGV[1]>;
$filefetched = get "ipaddressofClient+pathoffile";
***************************************
hope this helps you..
Write to in detail if you want more help..
be more clear
Regards
Nitin
khacharn, great insight! Works just the way I wanted..thanks!