Possible bug: async upload jquery compatibility

6 posts, 0 answers
  1. kabbas
    kabbas avatar
    11 posts
    Member since:
    May 2011

    Posted 31 Mar 2013 Link to this post

    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?
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 01 Apr 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Julius
    Julius avatar
    3 posts
    Member since:
    Jun 2014

    Posted 25 Jun 2014 in reply to Dimiter Madjarov Link to this post

    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


                 
  5. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 27 Jun 2014 Link to this post

    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!
     
  6. Julius
    Julius avatar
    3 posts
    Member since:
    Jun 2014

    Posted 30 Jun 2014 in reply to Petur Subev Link to this post

    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

                       


  7. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 01 Jul 2014 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready