TdxCloudStorageItem.FileSize Property
Returns the stored file’s size, in bytes.
Declaration
property FileSize: Integer read;
Property Value
Type |
---|
Integer |
Remarks
Use this property to show the file’s size in your application’s UI in various measurement units. The FileSize property returns -1 instead of the actual file size if the online storage service stores the file in a unique service-specific document format, such as a Google Sheets document. The storage service converts such documents to the requested data format on downloading.
If the FileSize property returns -1, you can use the MIMEType property to obtain the stored file’s actual multipurpose internet mail extension (MIME) content type and then use the active data provider‘s RegistryExtensionToMIMEType class property to identify the filename extension corresponding to the file data format defined by the MIME string. Alternatively, you can call the provider’s GetExtension function passing the file metadata container as a parameter. The cloud storage component’s download routines use this target format to request such files from the connected server.
Note
Only the TdxCloudStorageFile class publishes the FileSize property.