- Upload Suite Overview
- What's New?
- Choosing Upload Technology
- Evaluating Upload Suite
- Upload Suite Editions
- System Requirements
- Installation and Deployment Notes
- ActiveX/Java Uploader
- Where ActiveX/Java Uploader Can Be Useful
- Before You Started with ActiveX/Java Uploader
- ActiveX/Java Uploader Fundamentals
- ActiveX/Java Uploader User Interface
- Getting Started
- Using ActiveX/Java Uploader
- Troubleshooting
- Reference
- ActiveX/Java Uploader ASP.NET Reference
- ActiveX/Java Uploader PHP Reference
- ActiveX/Java Uploader JavaScript Reference
- $au Namespace ActiveX/Java Uploader JavaScript
- $au.amazonS3Extender Namespace ActiveX/Java Uploader JavaScript
- amazonS3Extender Class ActiveX/Java Uploader JavaScript
- converters Class ActiveX/Java Uploader JavaScript
- fileSettings Class ActiveX/Java Uploader JavaScript
- ActiveX/Java Uploader Client-Side Events Reference
- POST Field Reference
- HTML5/Flash Uploader
- Licensing Information
- Legal Notices
amazonS3Extender.checkIntegrity Property ActiveX/Java Uploader JavaScript
Supported browsers:



Gets or sets a value indicating whether uploaded files should be checked for integrity or not.
Syntax
JavaScript
Initialize
var u = $au.uploader({
//...other params...
});
var as3 = $au.amazonS3Extender(u);
as3.checkIntegrity(false);
//...other params...
u.writeHtml();
Property Value
Type: Boolean
If true, each file will be uploaded along with its MD5 hash, so Amazon S3 can validate uploaded file before storing it. Otherwise, no hash values will be sent.
Default value is false.
Remarks
If you enabled integrity checking, you should add hash field to the policy:
C#
public string ConstructPolicy()
{
StringBuilder policy = new StringBuilder();
DateTime expDate = DateTime.Now.ToUniversalTime().AddSeconds(6000);
policy.AppendLine("{ \"expiration\": \"" + expDate.ToString("s") + ".000Z\"");
policy.AppendLine(", \"conditions\": [");
policy.AppendLine(" {\"acl\": \"public-read\" }");
policy.AppendLine(" , {\"bucket\": \"" + _bucket + "\" }");
policy.AppendLine(" , {\"success_action_status\": \"200\"}");
policy.AppendLine(" , [\"starts-with\", \"$key\", \"\"]");
//Add hash field to the policy
policy.AppendLine(" , [\"starts-with\", \"$Content-MD5\", \"\"]");
policy.AppendLine("]");
policy.AppendLine("}");
// Encode the policy using UTF-8.
byte[] bytes = Encoding.UTF8.GetBytes(policy.ToString());
// Encode those UTF-8 bytes using Base64.
return Convert.ToBase64String(bytes);
}