here's an update.
I'm going to stick this under 'Weird Perl Oddity' until I figure out what's going on. My guess is that passing the magic variable that acts like a filehandle in some circumstances, and a plain scalar in others to an outside module that then passes it to a private subroutine is way too much to ask for and to keep the magic. I still don't understand why a filename uploaded that has a number in its name works (1photo.gif), but a filename that has only letters (hello.gif) doesn't. I'm thinking it's something to do with the tmp filename, but I may be way off on this.
The way I solved this problem is to stick the fileupload subroutine in the script that gets called, instead of calling an OO object from the script that does the file upload stuff. Why this makes a difference, I have no idea *shrugs* I created a new CGI object just for the fileupload function, since I read that mixing the OO and regular styles of writing with the CGI.pm can muck up magic thingies.
This resolution totally breaks my abstaction of a pretty darn intricate system (probably the hardest I've done) and plunks in code that may need to be repeated in more than one script since its now outside the OO Module.
*grumble grumble grumble*
Thought everyone would appreciate a resolution, as many times I tried to find an answer to my questions, I find instead an unfinished thread.
I'm still looking for a way to put a file upload script in an outside module and maybe some wisdom on why it makes a difference where this code is anyways. I'm thinking that I need to somehow pass the filehandle to the outside (in the module) , private upload function, instead of a magic variable.
thanks, everyone for your help
-justin simoni
!skazat!
In reply to Re: YAF(ile)U(ploading)Q(uestion)
by skazat
in thread YAF(ile)U(ploading)Q(uestion)
by skazat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |