Hi Pedro,
Thank you for contacting Syncfusion support.
To add an Authorization header on file upload request, we suggest you to use setRequestHeader in ClientSideOnBegin event. Using setRequestHeader you can add a header to Http request in xhr element. But for browsers below IE10 xhr will not be available in that case we suggest you to use ActiveXObject. Once the header is set you can access it in the handler from the HttpRequest.Headers. Please refer the following code example,
<code>
[ASPX]
<ej:UploadBox ID="upload1" runat="server" SaveUrl="saveFiles.ashx" RemoveUrl="removeFiles.ashx" ClientSideOnBegin="OnBegin"></ej:UploadBox>
[Script]
function OnBegin(args) {
if (!this._isXhrSupported()) // to check xhr supported browsers
xhr = new ActiveXObject("Microsoft.XMLHTTP");
else
xhr = new XMLHttpRequest(); // IE10 and below
xhr.open("post", "saveFiles.ashx", true);
xhr.setRequestHeader("Authorization", "Uploadbox");
xhr.send(null);
}
</code>
Sample prepared can be downloaded from below link:
http://www.syncfusion.com/downloads/support/forum/121305/ze/Upload_f121231-816692230
Please let us know if you have any other queries.
Regards,
Ezhil S