in reply to Uploading Multiple Files

I'm very confused about what you are trying to do here. You do realize that the file upload mechanism is a way for the client (browser) to send a file to the server, right? It looks to me like you are attempting to use it to send a file to the client.

Also, there would be no good reason to have the line my $req = new CGI; inside a loop like that.

Can you explain exactly what you are hoping to accomplish?

-sauoq
"My two cents aren't worth a dime.";

Replies are listed 'Best First'.
Re: Re: Uploading Multiple Files
by cal (Beadle) on Sep 27, 2002 at 20:45 UTC
    I want to send a pre-defined list of files to a server.
      I'm afraid might be in a dead end here. I don't think the server can request just any file from the client, that would be like a MAJOR security breach (f.ex. every server would have a file upload, which would discard the name and upload /etc/passwd or the Windows registry or something).

      I think the uploaded file's name is in the request that the client sends, and if I remember correctly, the uploaded file comes next. I don't think the webserver is even allowed to say anything before the entire file is uploaded, and therefore you can't request a file that way, but I'm on very thin ice here. Anyway, it sounds very dangerous to me.

      The server can't tell the client what files to send. (Hopefully not, at least.) As fsn points out, that would be a huge gaping security hole.

      -sauoq
      "My two cents aren't worth a dime.";