Reputation: 11
I would like to know, how to i pass custom header to KendoUpload's Remove url?
I see some example for passing header while upload file. http://www.telerik.com/forums/custom-authorization-header-for-upload
Please help.
Thanks Sudip
Upvotes: 0
Views: 1671
Reputation: 46
The remove event of KendoUpload misses the needed e.XMLHttpRequest object which is available in the upload event. You can try setting removeUrl: "empty-remove-url" and do your own custom remove ajax call like this :
function onRemove(e) {
$.ajax({
type: 'POST',
url: actual-remove-url,
data: e.files,
beforeSend: function(xhr) {
xhr.setRequestHeader("custom_header", "value");
}
});
}
Upvotes: 1