Re: Help with Net::ftp not downloading
- From: "A. Sinan Unur" <1usa@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 06 May 2009 12:23:48 GMT
Ben Morrow <ben@xxxxxxxxxxxx> wrote in
news:fh28d6-r94.ln1@xxxxxxxxxxxxxxxxxxxxxxx:
Quoth Ed Jay <edMbj@xxxxxxxxxxxx>:
My purpose: A customer uploads 3 - 5 images to a specific folder on
the server.
'The' server. *Which* server? (Machines have names for a reason.) In
particular, is this the same machine as is running the CGI, or not? If
it is, then Net::FTP is not going to help you one bit.
Let's assume for the moment that the customer uploads the photos to the
web server via another CGI script. Let's also assume that the images are
stored in a directory that is not publically accessible. Finally, let's
assume that the CGI script Ed Jay wants to write will also reside on
this particular server and has read access to the images.
We know how many images, their (sequentially numbered) filenames,
and where they are located on the server. With a click of the mouse
on my desktop machine, I want to download the images to a specific
folder on my desktop,
Write a script which, when invoked, will ZIP up all the image files and
stream back that archive to the client. The user can then save the ZIP
file containing the images in any folder on his computer.
and when the last image has successfully finished downloading, I want
to launch a specific application to view the images.
Not possible. However, you can extract the images from the ZIP file.
On the other hand, if the directory containing the images is publically
accessible and you use automatic index generation by the web server
software, you can write a batch file (to be run on the client computer)
to download all the images to a specific folder and then invoke whatever
image editor you want.
Similarly, I want my customers to capture the images to a specific
folder on their machine, and with a single click, upload all the
images to the specific folder on the server along with data
pertaining to image filenames and quantity.
OK. Unless there is something going on you haven't told us about, you
*simply* *cannot* do this with a CGI script. If you want to write to
files and run programs on the local machine, your program needs to be
running on the local machine.
Ditto. That just is not possible with CGI. If it were, surely online
photo sites would have already started it. There is a reason you must
either select each image to be uploaded individually or use a helper
application with those sites.
It may be possible to do something involving JavaScript and lowering
your browser's security settings to dangerous levels. I don't know
anything about that, and it certainly has nothing to do with Perl.
Is there some terribly good reason you can't run this program on the
machine the file is going to? It would make things much easier.
Yes, there is an important reason.
See, important and good are not the same things.
If you'd care to direct me to a different, more appropriate group,
please do. I thought that NET::ftp was a Perl module I'm having
difficulty with, and therefore on-topic.
No, you are not having difficulty with Net::FTP. You simply do not
understand how things work. Your problem is not about, say, fixing a
couple of bugs in the guidance system of a rocket you are building. No,
it is about why it is hard and not a good idea to launch the rocket in
your living room.
There is a reason you are in my killfile. You are clueless when it comes
to the basic concepts involving computers and you are resistant to
learning.
Sinan
--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(remove .invalid and reverse each component for email address)
comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/
.
- References:
- Re: Help with Net::ftp not downloading
- From: Ben Morrow
- Re: Help with Net::ftp not downloading
- From: Ben Morrow
- Re: Help with Net::ftp not downloading
- Prev by Date: Re: Perl 5.10: Safety of experimental features?
- Next by Date: FAQ 6.18 Why don't word-boundary searches with "\b" work for me?
- Previous by thread: Re: Help with Net::ftp not downloading
- Next by thread: Re: Help with Net::ftp not downloading
- Index(es):
Relevant Pages
|