Object: File
Syntax: File.Checksum
Type: String
Read/Write: Read only
Description:

The Checksum property returns a string representing the specified file's MD5 hash. You can use this value to verify that a file was not corrupted (during an upload, for example), by comparing before and after MD5 hashes.

Use FileManager's Checksum property to generate an MD5 hash on the client before uploading or after downloading with SoftArtisans FileUp. Then, compare FileManager's MD5 hash with the MD5 hash that FileUp generated on the server.

See Also: FileUp Checksum Property
Example:
<!-- Generate a file's MD5 hash:--> <script language="javascript">
            function getMD5(file) { var hash; var file; file_mgr = new ActiveXObject("SoftArtisans.FileManager");
            file = file_mgr.GetFile(file) hash = file.Checksum return hash } </script>
            <!-- You can use the generated hash to populate a form element:--><input type=button value="Generate Checksum" onclick="Checksum.value = getMD5(FILE1.value)">
            Checksum: <input type=text name=Checksum size=40> 

Copyright © 2010 SoftArtisans, Inc. All rights reserved.