Checking File Size with Java
I am trying to upload a zip file using cfzip in an application I am working on. I am using Java to get the files size before the file is uploaded however the results of the "scan" and the size of the fiel are completely different and I was hoping someone could point me to what is wrong.
Here is the java code
<!--- check the size of the zip file --->
<cfif len(form.zipGallery)>
<cfset f = createObject("java","java.io.File").init(form.ZipGallery)>
<cfif f.length() gt (25 * 2048)>
<cfset valError = listAppend(valError,"That file is too large. Please make you zip file less than 25MB" & "-" & #f.length()#)>
</cfif>
</cfif>
The file is 23.6 MB and it returns a value of 24804509.
What am I missing?
Thanks in advance.