I want to avoid sending request with OPTION http method. With below configuration Kendo sending two requests, first with OPTION method that sending nothing and right after with POST method with file data.
$("#fileupload").kendoUpload({
async: {
saveUrl: API_URL+'...',
withCredentials: false,
autoUpload: false,
},
uploadEventHandler (e) {
e.headers.set('Access-Control-Allow-Credentials', 'true');
},
type: "post",
error: function (e) {
var files = e.files;
if (e.operation === "upload") {
...
}
},
upload: function (d) {
d.data = {
...
};
},
showFileList: true,
})