- Upload Suite Overview
- What's New?
- Choosing Upload Technology
- Evaluating Upload Suite
- Upload Suite Editions
- System Requirements
- Installation and Deployment Notes
- ActiveX/Java Uploader
- HTML5/Flash Uploader
- Before You Started with HTML5/Flash Uploader
- HTML5/Flash Uploader Architecture
- HTML5/Flash Uploader User Interface
- Getting Started
- Using HTML5/Flash Uploader
- Troubleshooting
- Reference
- HTML5/Flash Uploader ASP.NET Reference
- HTML5/Flash Uploader PHP Reference
- HTML5/Flash Uploader JavaScript Reference
- $au Namespace HTML5/Flash Uploader JavaScript
- $au.amazonS3Extender Namespace HTML5/Flash Uploader JavaScript
- amazonS3Extender Class HTML5/Flash Uploader JavaScript
- amazonS3Extender Members HTML5/Flash Uploader JavaScript
- amazonS3Extender(uploader) Constructor HTML5/Flash Uploader JavaScript
- amazonS3Extender Properties HTML5/Flash Uploader JavaScript
- accessKeyId Property HTML5/Flash Uploader JavaScript
- bucket Property HTML5/Flash Uploader JavaScript
- bucketHostName Property HTML5/Flash Uploader JavaScript
- checkIntegrity Property HTML5/Flash Uploader JavaScript
- converters Property HTML5/Flash Uploader JavaScript
- region Property HTML5/Flash Uploader JavaScript
- converters Class HTML5/Flash Uploader JavaScript
- fileSettings Class HTML5/Flash Uploader JavaScript
- amazonS3Extender Class HTML5/Flash Uploader JavaScript
- HTML5/Flash Uploader Client-Side Events Reference
- POST Field Reference
- Licensing Information
- Legal Notices
amazonS3Extender.checkIntegrity Property HTML5/Flash Uploader JavaScript
Supported technologies:
Gets or sets a value indicating whether uploaded files should be checked for integrity or not.
Syntax
JavaScript
Initialize
var u = $au.imageUploaderFlash({
//...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);
}