Gets or sets an algorithm to generate a hash value for each user-selected file.
$au.uploader({
metadata: {
//...other params...
hash: "",
//...other params...
}
})
$au.uploader('uploaderID').metadata().hash(value);
value = $au.uploader('uploaderID').metadata().hash();
Type: String
The algorithm to generate a hash value for each user-selected file.
Possible values are listed in the table below.
| Value | Description |
|---|---|
| SHA | SHA hash algorithm. |
| MD2 | MD2 hash algorithm. |
| MD5 | MD5 hash algorithm. |
You can specify several hash algorithms separated by semicolon.
Default value is "".
The hash is calculated only for the original file, not for converted files (even if the original file is not uploaded).
To get an uploaded hash sum at the server, you should extract POST field which is named in the following way: HashCodeXXX_N, where XXX is a string value specified in this property (hash algorithm), and N is the index of the file in the request. E.g. if the property value is MD5;SHA, you will get the following POST fields: