Algorithm to generate a hash value for each file to upload to the server.

Syntax

Initialize

JavaScript

<script type="text/javascript" src="iuembed.js">  </script>
<script type="text/javascript">
var vu = new VideoUploaderWriter("VideoUploaderID", 610, 500);
//...other params...
vu.addParam("HashAlgorithm", "");
//...other params...
vu.writeHtml();
</script>

Get/Set Value in Runtime

JavaScript

getVideoUploader("VideoUploaderID").setHashAlgorithm(value);
value = getVideoUploader("VideoUploaderID").getHashAlgorithm();

Property Value

A string value which specifies what hash algorithm to use. If an empty string is specified, no hash value is calculated.

Possible values are listed in the table below.

Hash algorithm nameDescription
SHASHA hash algorithm.
MD2MD2 hash algorithm.
MD5MD5 hash algorithm.

You can specify several hash algorithms separated by semicolon.

Default value is "".

Remarks

To get hash value on the server side, you should extract POST field which is named in the following way: HashCodeXXX_N, where XXX is the string value specified in this property (algorithm name), and N is the index of the file in the request.

When hash value is added to the request, it is encoded with Base64 algorithm. So it is necessary to decode it back. Most server platforms already have facilities to work Base64 encoding, however, if you have problems with it, refer RFC 3548.

Note

The hash is calculated only for the original file, not for the thumbnails (even if the source file is not uploaded).

If you specify several algorithms, several hash values will be sent (for each algorithm). E.g. if you specify a value MD5;SHA, you will get the following POST fields:

  • HashCodeMD5_1, HashCodeMD5_2, etc.
  • HashCodeSHA_1, HashCodeSHA_2, etc.
Note

Hash calculation is quite resource-intensive operation. That is why if you need not verify uploaded files on the server, it makes sense to disable this feature to make Video Uploader faster. To do it, just specify empty string in this property.