Hello, Martin,

I definitely am not the least bit interested in any "shooting match" over this, but I think you may be mistaken. I have an implementation which utilizes the default file item. I set the DiskFileUpload file threshold at 4096. But, I still upload files with nothing "in them", i.e. size 0. This is, so far as I can tell, because When the disk file upload is used to parse the request, the FileUploadBase ultimately does the parsing, and the file upload base seems not to emply the file threshold setting. Isn't this right? If not, I would definitely like to know (A) why not? and (B) why does a file with a size of 0 get uploaded when the threshold is set at 4096?

Michael McGrady

Martin Cooper wrote:

On Wed, 20 Oct 2004 11:27:40 -0700 (PDT), Joe Smith <[EMAIL PROTECTED]> wrote:


If FileItem.getSize() == 0, it means either
1) The file doesn't exist
2) The file exists, but empty file.



This isn't completely accurate. The fact that the FileItem exists means that the client (usually a browser) submitted a multipart part for it. If the size is zero, as determined by getSize(), then the client submitted a zero-length part (i.e. submitted no data for that part).

Recall that a FileItem may or may not be backed by a file in the file
system. That is determined by the particular FileItem implementation.
The default implementation stores file item data on disk only if the
size exceeds a configurable threshold, which all but precludes empty
files.

--
Martin Cooper




My question is if there are other ways to distinguish 2 cases?

Please advise. Thanks!!


--------------------------------- Do you Yahoo!? vote.yahoo.com - Register online to vote today!




--------------------------------------------------------------------- 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]



Reply via email to