Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

General ? re: downloading & uploading files in Perl

by Anonymous Monk
on Sep 22, 2000 at 09:05 UTC ( [id://33612]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Please excuse as I am somewhat of a newbie. I checked the FAQ's & other resources on this site and couldn't find a clear cut answer. I'm writing a program for students so they can upload & download test over the web. It is a CGI program in Perl. Does CGI.pm have any built in commands that support file loading or FTP or something? I also need to record the times which students finish downloading or uploading files if anyone has a suggestion for that as well. Thanks in advance for any help, Ed K. Chicago
  • Comment on General ? re: downloading & uploading files in Perl

Replies are listed 'Best First'.
Re: General ? re: downloading & uploading files in Perl
by ncw (Friar) on Sep 22, 2000 at 12:22 UTC
    You can upload files using CGI module no trouble - see the CREATING A FILE UPLOAD FIELD section in the documentation.

    You would use the webserver and http to download files - just emit an <a href="file.txt"> as usual in your output for the user to click on.

    If you want this logged then either look in the web logs or make the cgi return the file eg, <a href="my.cgi?file=file.txt">. Make sure the files aren't directly accessible by the webserver in this case.

    CGI doesn't deal with FTP. In fact I suggest you steer clear of FTP - it is hard to set up securely. You can investigate the Net::FTPServer module if you are desperate for FTP.

RE: General ? re: downloading & uploading files in Perl
by princepawn (Parson) on Sep 22, 2000 at 17:04 UTC
    If you are using Unix and want to do file uploads to a webserver via a form I suggest my CPAN module HTTP::File .

    I do not recommend my module for Windows as there have been some usage problems on Windows that could not be resolved.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://33612]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2025-07-08 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.