PERL, FTP and Browser Upload

P

prsjm3qf

Hello out there,
I'm a bit of a Perl newbie and have dropped for
the job of writing a file upload system.
I've tried various HTTP solutions with form ACTION=POST but have found
it unreliable for large files because of server timeout errors and
anyway, it's a protocol not really designed for the job.
I'm now thinking that the grown up way to do it has got to be with FTP.

I'd love to get them all to use an ftp client but realistically its not
going to happen so I want to have users select files in their browser
from their local system, press a button and Binary FTP the files into a
pre created directory on an ftp server. There seem to be various scripts
around that say they do this but on closer inspection they start getting
a bit vague and I'm not convinced that they are actually using FTP as
opposed to HTTP.

Can anyone point me to a Perl CGI FTP script that will do this - doesn't
matter if it's a commercial one cos this is worth paying for if it does
the job. Failing that can anyone give me some pointer ideas on how to
start writing my own so I can set off in the right direction.


Thanks for any help

(e-mail address removed)
 
G

Gregory Toomey

prsjm3qf said:
Hello out there,
I'm a bit of a Perl newbie and have dropped for
the job of writing a file upload system.
I've tried various HTTP solutions with form ACTION=POST but have found
it unreliable for large files because of server timeout errors and
anyway, it's a protocol not really designed for the job.
I'm now thinking that the grown up way to do it has got to be with FTP.

As an aside, www.geocities.com has an excellent upload facility for users
uploading files to their web sites. I think itsjust browser based. Have a
look at how they do it.

gtoomey
 
B

Bart Lateur

prsjm3qf said:
I'd love to get them all to use an ftp client but realistically its not
going to happen so I want to have users select files in their browser
from their local system, press a button and Binary FTP the files into a
pre created directory on an ftp server.

There are various FTP programs that pretend that the site's directory is
a directory on your own system. Get them to use one of those. All you
have to do is install and set it up to use your site -- perhaps you can
script it, accessing the registry directly.

Perhaps Windows XP even has this functionality built-in, but I'm not
sure; I'm not very familiar with XP, as I've used it only a few times.
There seem to be various scripts
around that say they do this but on closer inspection they start getting
a bit vague and I'm not convinced that they are actually using FTP as
opposed to HTTP.

Net::FTP is a good way to script FTP. See the chapter in Lincoln Stein's
book "Network Programming with Perl". At least the code, but I believe
also the text for this one chapter, is available on the 'net:

<http://modperl.com:9000/perl_networking/>
<http://modperl.com:9000/perl_networking/sample/ch6.html>
 
J

James Willmore

I'd love to get them all to use an ftp client but realistically its
not going to happen so I want to have users select files in their
browser from their local system, press a button and Binary FTP the
files into a pre created directory on an ftp server. There seem to
be various scripts around that say they do this but on closer
inspection they start getting a bit vague and I'm not convinced that
they are actually using FTP as opposed to HTTP.

Can anyone point me to a Perl CGI FTP script that will do this -
doesn't matter if it's a commercial one cos this is worth paying for
if it does the job. Failing that can anyone give me some pointer
ideas on how to start writing my own so I can set off in the right
direction.

I guess you have the 'point-and-click' users versus ones who can read
directions. If that's the case, you may want to use the Tk module and
Net::FTP to accomplish what you're looking for. The plus side is that
the users will get a GUI to use, similar to Windows Exploer. The down
side is distribution of the script - if you have many users spread out
to the four winds, this could present some real issues - which is
probably why you asked for a browser based solution.

There is a way to distribute a Perl::Tk script through the browser.
There's a plugin that, last I checked, was still being developed.
It's called PerlPlusPlugin, but I'm not sure how active the
development is today - it was about a year ago when I tried it out.

Best bet is to, I hate to say it, but use the Java Applet that someone
else suggested. It seems to fit the bill pretty well.

HTH

Jim
 
T

TheWizZ

prsjm3qf said:
Hello out there,
I'm a bit of a Perl newbie and have dropped for
the job of writing a file upload system.
I've tried various HTTP solutions with form ACTION=POST but have found
it unreliable for large files because of server timeout errors and
anyway, it's a protocol not really designed for the job.
I'm now thinking that the grown up way to do it has got to be with FTP.

You have got to try out iBULC (internet Batch UpLoad Component). I
will upload through the browser and support unlimited file size. You
will need to install the free iBULC client though for it to work.
http://www.ibulc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top