-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Konstantin,
On 9/1/2010 6:26 PM, Konstantin Kolinko wrote: > AFAIK, the said threshold determines when a file is too big to be hold > in memory and should be written to disk. So, I think that "Permission > denied" actually comes from your file system. You have to read the > docs (or the source code), but I guess that it tries to write to > ${catalina.base}/temp (aka $CATALINA_TMPDIR, aka java.io.tmpdir ). Interesting. That would mean that, when the uploaded file exceeds this threshold (but not the maximum file size allowed for uploads), commons-fileupload writes the file first to the temp directory, then probably hands an InputStream object to the consumer that reads from the file instead of memory. That sounds like a decent implementation that allows large files to be uploaded but does not turn into a memory hog. Paul, what are you doing with these files? Are you saving them onto the disk? I don't believe commons-fileupload actually promises to write the files to a particular place on your behalf: I think you have to write the file somewhere yourself. Is it possible that when commons-fileupload tries to write to the temp dir, it doesn't have permission? If you're running Tomcat as a service, it's current-working-directory might actually be '/', and commons-fileupload might inherit that as the temp directory if you don't tell it otherwise. I think it's worth looking further into this problem, otherwise it might pop-up again when you try to upload an even bigger file. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx/CKwACgkQ9CaO5/Lv0PDEeQCgw+eKca1nyMqLveP769uu0PeG HrwAnjCNOz96LNpfrAWvtqJJlW6g7hbp =8k81 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org