kendo-upload

Kendo Upload - CSRF Token with kendo ui jquery

家住魔仙堡 提交于 2020-07-09 17:57:12
问题 how to add CSRF Token in kendoUpload $("#image").kendoUpload({ async: { saveUrl: "http://url", } }); 回答1: <meta name="_token" content="{!! csrf_token() !!}" /> <input type="file" name="files" id="photos" /> var token = $('meta[name="_token"]').attr('content'); $("#photos").kendoUpload({ async: { saveUrl: "http://url/save" }, upload: onUpload }); function onUpload(e) { var xhr = e.XMLHttpRequest; if (xhr) { xhr.addEventListener("readystatechange", function (e) { if (xhr.readyState == 1 /*

Triggering OnCancel event of kendo upload on click of button

随声附和 提交于 2019-12-14 02:26:35
问题 I want to Cancel the file uploading on click of cancel button. means I want to trigger the onCancel(e) event on click of my cancel button My code is, @(Html.Kendo().Upload() .Name("files") .Multiple(false) .Async(a => a .Save("UploadArtifactFile", "PP", new { TeacherEvalID = ViewBag.TeacherEvalID, ObservationID = ViewBag.ObservationID, Accountid = ViewBag.AccountID }) .AutoUpload(false) .RemoveField("") ) .Events(events => events .Success("onSuccess") .Select("onSelect") .Error("onUploadError

Kendo Grid inline editing with Kendo Upload return an null result

寵の児 提交于 2019-12-12 10:57:48
问题 I had Kendo UI Grid with inline editing and one of my field ( propertyLogo ) I use kendoUpload to upload an image. With the kendoUpload function fileUploadEditor , I use saveUrl: "./image.php", and convert the image into base64 format to save into database. When I Add/Edit I manage to update all the field successfully except the propertyLogo field it return a NULL result. I do not know which part I'm doing wrong, but I'm not able to save the image into database. Here I'll provide my script.

Cancel file upload on server when cancelled from client

烂漫一生 提交于 2019-12-12 04:25:32
问题 I am using kendo file upload control in my application. I select a file of 20 MB size for example. The request goes to the server which needs to upload this document to azure + insert a DB entry pointing to the blob. Issue is, if the server has all the bytes transferred to itself and the rest of the operations takes sometime (like uploading the file and inserting an entry to DB) and at the same time, user cancels upload from client, it gets cancelled on the client end BUT server still goes

Kendo Angular Upload Adds to Start of Text File?

◇◆丶佛笑我妖孽 提交于 2019-12-11 14:06:13
问题 I'm using the Kendo Upload control in an Angular app and it's 99% working, but it seems to be adding a small piece of text to the start of the text file I'm uploading. Here is the HTML definition: <kendo-upload [saveUrl]="SaveUrl" (upload)="UploadHandle($event)" (error)="UploadError($event)" [restrictions]="Restrictions" (success)="UploadSuccess($event)"></kendo-upload> The upload handler: UploadHandle(e: UploadEvent): void { e.data = { type: 'MasterFile' }; } The restrictions and save URL

kendo uploader Cross domain issue in Web.Api

混江龙づ霸主 提交于 2019-12-10 10:38:00
问题 i already enable the Cors in my WEB API project ! all other methods inside the API controller can access from the other project ! but kendo uploader request can not reach to the controller method $("#files").kendoUpload({ async: { xhrFields: { withCredentials: true }, saveUrl: 'http://localhost:23618/API/test/UploadAttachment', removeUrl: 'http://localhost:23618/API/test/RemoveAttachment', autoUpload: true }, upload: function (e) { e.data = { contactID: 5 }; }, error: onError }); error A

kendo uploader Cross domain issue in Web.Api

不打扰是莪最后的温柔 提交于 2019-12-06 01:52:53
i already enable the Cors in my WEB API project ! all other methods inside the API controller can access from the other project ! but kendo uploader request can not reach to the controller method $("#files").kendoUpload({ async: { xhrFields: { withCredentials: true }, saveUrl: 'http://localhost:23618/API/test/UploadAttachment', removeUrl: 'http://localhost:23618/API/test/RemoveAttachment', autoUpload: true }, upload: function (e) { e.data = { contactID: 5 }; }, error: onError }); error A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true.