I had the same problem when I tried to copy code from one working page to another but forgot to set the form to ENCTYPE="multipart/form-data". I was able to create the uploaded files they'd be of size 0. It was resolved by properly setting the enctype. I'd recheck that form tag just to be certain. Good luck.
Saadiq
On Wednesday, March 26, 2003, at 07:41 PM, Richard Schilling wrote:
Having a particular problem today that I wasn't yesterday :-)
Using the following code to upload a file from a multipart form with a file field in it:
[-
if (defined $fdat{developmentmapfile}) {
open NF, "> /usr/local/apache/htdocs/images/$fdat {'developmentmapfile'}" or die $! . ": Can't open file $fdat {'developmentmapfile'}."; binmode NF; print NF $buffer while read ($fdat {developmentmapfile}, $buffer, 32768) or die $! . ": Can't write to permanent file during upload."; close NF; }
-]
The images directory is set to owner nobody, and group nobody.
The file is created, but the code dies when it tries to print to NF. After the script dies, the file size is left at 0. Can't for the life of me figure out what's missing.
Anyone?
Thanks.
--Richard Schilling
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
