Greg wrote: > > I'm using Apache::ASP-script that was taken from > http://www.nodeworks.com/asp/eg/file_upload.asp to upload an image to the > server. > the server configured as front-end (mod_proxy) + backend (mod_perl) server, > Uploader script is processed on backend server. > > here is the code: > > if (open OUT, ">$destfile") { > while (<$filehandle>) { print OUT $_; } > close OUT; > There are different things that could be going wrong here, but my guess is that you are trying to print binary data and it gets corrupted, further, the notation while(<$filehandle>) might be trying to break the data on a newline, which isn't appropriate either. So first, I might use a sysread(FILEHANDLE,SCALAR,LENGTH,OFFSET) call to slurp the binary into a scalar, then if you want to print it, try a $Response->BinaryWrite() as shown at: http://www.nodeworks.com/asp/eg/binary_write.htm With the latter, you could likely render the image as the actual script response with the right $Response->{ContentType} set. If you want to make your example above work, try setting OUT to binmode, with binmode(OUT), before you write to it. Make sure too that you don't have an Apache LimitRequestBody. Failing all of these, I could give you my Apache::ASP dev version, which has some new file upload work done, but none that would obviously fix your problem. -- Joshua _________________________________________________________________ Joshua Chamas Chamas Enterprises Inc. NodeWorks >> free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com 1-714-625-4051