Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 1277
Product
XFile
Version
all versions prior to 2.3.4
Title
The FileSize property of XFile’s XFFile object returns incorrect values for files over 2 GB
Problem
The FileSize property of the XFFile object returns incorrect values for files of size equal or greater than 2 GB. This is because the FileSize property is of type long. In C++ the maximum value that a long can hold is 2147483647, which limits the size to 1 byte less than 2 GB.
Solution
This issue has been fixed in version 2.3.4 of XFile by adding a new property called FileSizeLarge of type double to the XFFile object.

Here is a code example in JavaScript where this property is being used to display the size of each file in the AXFFile objects’s (XFile’s Visual Upload Control) Files collection:

// Loop through the Files collection and check each file's size 
for(i = 1; i <= AXFFile.Files.Count; i++)
{  
  alert("FileSizeLarge property: " + AXFFile.Files(i).FileSizeLarge + " Bytes "); 

}

Created : 8/7/2008 6:29:03 PM (last modified : 8/7/2008 6:29:03 PM)
Rate this article!
Comments