RadAsyncUpload On Mobile phone (Galaxy SII)

5 posts, 0 answers
  1. Sebastien
    Sebastien avatar
    4 posts
    Member since:
    Sep 2010

    Posted 23 Apr 2013 Link to this post

    Hi, i am currently creating a file upload section on a web page that can be view on every type of device (Computer, Tablets and mobile phone). When i test the file upload section on a standard computer everything works perfectly. When i test it on mobile phone (I'm using Samsung Galaxy S2 with all the latest update) i have access to the files on my phone. I can select one and it seems to upload perfectly ( I got the green dot ) but in fact the file created in the template directory of the control ( app_date\RadUploadTemp ) has a size of 0 bytes. So when i press my submit button the file copied in my working directory is invalid and cannot be read. You can test it yourself on your demo page.
    http://demos.telerik.com/aspnet-ajax/asyncupload/examples/additionalfields/defaultcs.aspx

    When i upload a file on this page, the file size is always 0...

    Is it a known issue ? a mobile browser limitation ? or what ever the explanation...

    Can you help me on that ? or do you know an alternative solution for mobile browser ?

    Thanks !

    Sébastien
  2. Plamen
    Admin
    Plamen avatar
    2732 posts

    Posted 25 Apr 2013 Link to this post

    Hello,

     

    Thank you for contacting us again. 

    This is a known issue that seems to come from the Android's browser itself. We found that problem logged in their tracking system - 1 and 2. In order to workaround that problem please add the following lines of code before the declaration of the RadAsyncUpload. Disabling - FileApi, Silverlight and Flash modules the control will upload the selected files at once (not on chunks). 

    <script type="text/javascript">
       
        Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; };
        Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable = function() {return false; };
        Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function() {return false; };
     </script>

    Greetings,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sebastien
    Sebastien avatar
    4 posts
    Member since:
    Sep 2010

    Posted 25 Apr 2013 Link to this post

    Thanks for your response ! It works perfectly.

    I've put your code in my user control with a condition ( kind of if (android))

    I guess i have to wait for an update from Android to fix that correctly.

    Thanks again !
  5. Marc
    Marc avatar
    39 posts
    Member since:
    Nov 2012

    Posted 05 Jun 2013 Link to this post

    Hi, I have the same exact problem with my Android phone but I can't make it work. I put the lines in the head of my file with my other javascript code. I use alert("TEST") to make sure the code has been executed but my file is always 0kb.

    Galaxy Nexus Phone v4.1.2
    Telerik Q1 2013
  6. Marc
    Marc avatar
    39 posts
    Member since:
    Nov 2012

    Posted 05 Jun 2013 Link to this post

    I finally make it work ;-)

    I had to put the lines just before the declaration of the RadAsyncUpload control. If I put them in the head section then it not works.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017