This is a migrated thread and some comments may be shown as answers.

Possible bug: async upload jquery compatibility

5 Answers 93 Views
Upload
This is a migrated thread and some comments may be shown as answers.
kabbas
Top achievements
Rank 1
kabbas asked on 31 Mar 2013, 02:08 PM
Hello,

The async upload fails to upload which can bee checked in the demo:

http://demos.kendoui.com/web/upload/async.html

When I change the jquery version used to 1.8.2, it works fine.

Any suggestions?

5 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 01 Apr 2013, 07:46 AM
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!

 

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


             
0
Petur Subev
Telerik team
answered on 27 Jun 2014, 01:00 PM
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
 
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

                   


0
Petur Subev
Telerik team
answered on 01 Jul 2014, 11:06 AM
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
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Upload
Asked by
kabbas
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Julius
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or