metadata.uploadRequestHeaders(Object) Method HTML5/Flash Uploader JavaScript

Supported technologies:

Adds a HTTP header to the POST request.

Syntax

JavaScript
$au.imageUploaderFlash('uploaderID').metadata().uploadRequestHeaders(keyValuePairs);

Parameters

keyValuePairs

Type: Object

Key-value pairs specifying the header name and content, e.g. {'X-My-Custom-Header1': 'My value', 'X-My-Custom-Header2': 'Another value'}

Remarks

To add multiple headers, specify several key-value pairs. If you call this method multiple times, old values are removed and replaced by the new one. For example, if you want to clear custom headers, just pass an empty object {}.

Calling this method without an argument will return a current header object. It is useful if you need to append a new header to the existing ones.