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

RadAsyncUpload On Mobile phone (Galaxy SII)

4 Answers 122 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Sebastien
Top achievements
Rank 1
Sebastien asked on 23 Apr 2013, 06:10 PM
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

4 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 25 Apr 2013, 01:18 PM
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.
0
Sebastien
Top achievements
Rank 1
answered on 25 Apr 2013, 03:27 PM
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 !
0
Marc
Top achievements
Rank 1
answered on 05 Jun 2013, 07:49 PM
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
0
Marc
Top achievements
Rank 1
answered on 06 Jun 2013, 02:53 AM
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.
Tags
AsyncUpload
Asked by
Sebastien
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Sebastien
Top achievements
Rank 1
Marc
Top achievements
Rank 1
Share this question
or