5 Answers, 1 is accepted
0
Hello,
This issue is caused by a breaking change in jQuery. The fix is already applied and will be available in the next internal build. A workaround at the moment would be to return a non-empty JSON result.
Sorry for the caused inconvenience. Wish you a great day!
Dimiter Madjarov
the Telerik team
This issue is caused by a breaking change in jQuery. The fix is already applied and will be available in the next internal build. A workaround at the moment would be to return a non-empty JSON result.
Sorry for the caused inconvenience. Wish you a great day!
Greetings,
Dimiter Madjarov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Julius
Top achievements
Rank 1
answered on 25 Jun 2014, 10:34 AM
Hi Sir
Im new using kendo UI upload can you please help me on my current problem:
Problem Uploading an file with Kendo UI Upload - File Upload Success on my directory but the Status of the File Upload is Error
What do you mean by " return a non-empty JSON result."
here are my sample codes
////////////////////////////////////////////////////////////////////////////////////////////
kendo_upload.aspx
///////////////////////////////////////////////////////////////////////////////////////////
$("#uploaded").kendoUpload({
async: {
saveUrl:"kendo_upload.aspx",
removeUrl:"remove",
autoUpload: true
},
onSuccess: onSuccess,
error: onError
});
///////////////////////////////////////////////////////////////////////////////////////////////
kendo_upload.aspx.cs
///////////////////////////////////////////////////////////////////////////////////////////////
protected void Page_Load(object sender, EventArgs e)
{
ProcessRequest();
}
public void ProcessRequest()
{
Response.Expires = 1;
try
{
HttpPostedFile file = Request.Files["uploaded"];
if (file != null)
{
string savepath = Server.MapPath("~/UploadFiles/");
string filename = file.FileName;
file.SaveAs(savepath + filename);
Response.ContentType = "application/json";
Context.Response.Write("{}");
}
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
//////////////////////////////////////////////////////////////////////////////
Appreciate your help sir in advance thanks
Im new using kendo UI upload can you please help me on my current problem:
Problem Uploading an file with Kendo UI Upload - File Upload Success on my directory but the Status of the File Upload is Error
What do you mean by " return a non-empty JSON result."
here are my sample codes
////////////////////////////////////////////////////////////////////////////////////////////
kendo_upload.aspx
///////////////////////////////////////////////////////////////////////////////////////////
$("#uploaded").kendoUpload({
async: {
saveUrl:"kendo_upload.aspx",
removeUrl:"remove",
autoUpload: true
},
onSuccess: onSuccess,
error: onError
});
///////////////////////////////////////////////////////////////////////////////////////////////
kendo_upload.aspx.cs
///////////////////////////////////////////////////////////////////////////////////////////////
protected void Page_Load(object sender, EventArgs e)
{
ProcessRequest();
}
public void ProcessRequest()
{
Response.Expires = 1;
try
{
HttpPostedFile file = Request.Files["uploaded"];
if (file != null)
{
string savepath = Server.MapPath("~/UploadFiles/");
string filename = file.FileName;
file.SaveAs(savepath + filename);
Response.ContentType = "application/json";
Context.Response.Write("{}");
}
}
catch (Exception ex)
{
Response.Write(ex.ToString());
}
}
//////////////////////////////////////////////////////////////////////////////
Appreciate your help sir in advance thanks
0
Hello,
In your case you return non empty string:
Context.Response.Write("{}");
Which is considered en exception because the string is not empty. Empty string should do the work:
Context.Response.Write("");
Kind Regards,
Petur Subev
Telerik
In your case you return non empty string:
Context.Response.Write("{}");
Which is considered en exception because the string is not empty. Empty string should do the work:
Context.Response.Write("");
Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Julius
Top achievements
Rank 1
answered on 30 Jun 2014, 02:55 PM
Hi Sir Petur
Sir like you said I change the following to empty string sir.. but still error in mine.. :(
Here sir
string savepath = Server.MapPath("~/UploadFiles/");
string filename = file.FileName;
file.SaveAs(savepath + filename);
Response.ContentType = "application/json";
Context.Response.Write("");
Thanks Sir again
Sir like you said I change the following to empty string sir.. but still error in mine.. :(
Here sir
string savepath = Server.MapPath("~/UploadFiles/");
string filename = file.FileName;
file.SaveAs(savepath + filename);
Response.ContentType = "application/json";
Context.Response.Write("");
Thanks Sir again
0
Hello Julius,
The browser screenshot that you shared shows that the response from the server is actually some HTML page. Try to return empty string instead.
Kind Regards,
Petur Subev
Telerik
The browser screenshot that you shared shows that the response from the server is actually some HTML page. Try to return empty string instead.
Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!