---
title: "amazonS3Extender.checkIntegrity Property  HTML5/Flash Uploader JavaScript"
canonical: https://www.aurigma.com/docs/us8/FH_P_J_$au_amazonS3Extender_checkIntegrity.htm
product: "Upload Suite 8"
---

# 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
 
```
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:
```csharp
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);
}
```

## See Also
 
### Reference
 
- [Aurigma.ImageUploaderFlash.AmazonS3.AmazonS3Extender.CheckIntegrity ASP.NET Property HTML5/Flash Uploader](https://www.aurigma.com/docs/us8/FH_P_Aurigma_ImageUploaderFlash_AmazonS3_AmazonS3Extender_CheckIntegrity.htm.md)
- [AmazonS3Extender.CheckIntegrity PHP Property HTML5/Flash Uploader](https://www.aurigma.com/docs/us8/FH_P_P_AmazonS3Extender_CheckIntegrity.htm.md)
