Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Uploading Multiple Files

by swiftone (Curate)
on Sep 27, 2002 at 20:30 UTC ( #201327=note: print w/replies, xml ) Need Help??


in reply to Uploading Multiple Files

I don't totally understand what you're trying to do, but here are a few comments that I hope can help you:
  • Why are you creating multiple CGI objects? I think you want to create a single object, and read the values from that.
  • CGI has an upload() function for uploading files, and the docs offer a recommended idiom.
  • You don't need to name your fields different things -- The upload() function can be used in array context (see docs)
  • Not all browsers send the entire path of the upload (Netscape, at least my netscape, sends only the filename, no path) So whatever you are trying to accomplish, they'd break your hash idea..

Update: I think I've figured out what you are trying to do: You want to force the page to upload the given files? Can't be done on the perl side. Perhaps javascript, but the actual sending of the file is decided on the browser side, and perl can only work with what it's given. Of course, if I'm wrong about your goal, please clarify.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://201327]
help
Chatterbox?
[Corion]: I think you need to load Readline in the debugger, but I don't know how
[Corion]: Yay, invitation for a team-building workshop, with a team of 100 people :-/
[Eily]: marto after an additional read I started to see the light actually. And choroba's link was helpful as well :)
[Corion]: I'll send my colleague who doesn't yet know the people there, and I'll do production duty instead.
[GotToBTru]: ugh. Thanks Corion

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2017-07-26 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (396 votes). Check out past polls.