Wojciech Kocjan <[EMAIL PROTECTED]> writes:

> > It's possible to upload two files with the same variable name.  Do
> > we want to handle this?  Any ideas how?  It's even more of a pain
> > in the ass than variables, because every file has several pieces
> > of information associated with it.

> I can't think of a situation where I'd need such a feature. I've
> been using forms in sometimes very sick ways ie submit button's name
> being a "command" (ie. b_goto_main will do a headers redirect after
> storing stuff in SQL :-). The only logical situation is where the
> name actually represents some logical action to take or similar
> use...

> I'm not sure if the 'upload' API should be made a bit messy with
> uploads with the same name...

It's not a common case, and a lot of other people don't implement it.

> > The easiest thing is to do like PHP and say "ok, just don't do
> > that".  It makes a lot of things easier.

> Hell, that's not a good way... ;-)

It's a tradeoff.  The best API if we want to do it 'right' is not
going to be easy to use.

> Our variables way is somehow based on AOLserver's, but AOL's methods
> for uploading files are way too easy to be used, at least with me.

They don't seem to allow for multiple uploads with the same name
either.

> > If people don't want to go the easy route, I'd like to hear what
> > kind of API you would like to see.

> Actually no idea here. The only thing I came up with is the -all
> flag in every method, but this makes little sense...

It would be something like this:

if { [ upload info XYZ exists ] == 1 } {
    set fileupload [ upload get XYZ ]
    while { [ $fileupload exists ] } {
        set data [ $fileupload data ] # or whatever...
        $fileupload next # this does the magic of moving it to the next one
   }
}

Or something along those lines.  That's a lot more work than it would
be otherwise, though:-/

-- 
David N. Welton
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/
         Work: http://www.innominate.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to