This documentation is for the old version. Go to the latest Upload Suite docs

ImageUploader.UserAgent Property

Supported in: ActiveX , Java

User-Agent string.

Syntax

Initialize

JavaScript
<script type="text/javascript" src="iuembed.js">  </script>
<script type="text/javascript">
var iu = new ImageUploaderWriter("ImageUploaderID", 610, 500);
//...other params...
iu.addParam("UserAgent", "Image Uploader");
//...other params...
iu.writeHtml();
</script>

Get/Set Value in Runtime

JavaScript
getImageUploader("ImageUploaderID").setUserAgent(value);
value = getImageUploader("ImageUploaderID").getUserAgent();

Property Value

A string value that specifies User-Agent string which is sent by Image Uploader in the header of the upload request.

Default value is "Image Uploader" (Aurigma Image Uploader JE).

Remarks

Use the code below to make Image Uploader sending user-agent string the same as of a browser hosting Image Uploader.

JavaScript
iu.addParam("UserAgent", window.navigator.agent);

Pay attention that default value of this property in ActiveX version differs from this value in Java:

  • Image Uploader - in ActiveX;
  • Aurigma Image Uploader JE - in Java.