Skip to main content
Inspiring
May 24, 2016
Question

Air 22 maximum upload file size

  • May 24, 2016
  • 4 replies
  • 1056 views

I just came across an odd 'limit' on file upload. My server is set to receive files up to 100GB. Using the same client code, and the same server side code, on a Mac or Win running Air 22 I am able to upload files 30,40,50, ... GB. On Android, I seem to be able to upload 7,454 kb or 7,469 kb of the file, and it stops (if the file is smaller, it works, if larger it stops at one of these sizes every time). I am using  file.upload(uploadURL)  - same url works for Mac/Win. Is there some sort of limit on the upload size of files on the Android?

This topic has been closed for replies.

4 replies

Spider22Author
Inspiring
June 10, 2016

Have tried on Android 4 and Android 6 devices - same results.

Spider22Author
Inspiring
June 9, 2016

I have been experimenting with various configurations and have discovered the following, all using Air 22:

- when I upload using the method above, and the upload url is https, on an Android device the upload stops at 7,469 KB

- when I upload using the method above, and the upload url is http, on an Android device the upload succeeds

- when I upload using the method above, and the upload url is https or http, on an iOS/Mac/Windows device the upload succeeds

All using the same physical server, same upload.php, same AS code.

I am not certain why this would happen only with https on Android on file upload sizes of over 7.5MB? I have also heard that other coders are experiencing some issues related to tls/ssl/https/rtmps on Android with Air 22 - was there some changes to the security handling on Android Air 22 that may be causing this?

Thanks.

Mayank_Gupta
Adobe Employee
Adobe Employee
June 10, 2016

Is it specific to any android version like N/M or facing on every android device ?

-Mayank

Spider22Author
Inspiring
June 1, 2016

The code follows the following:

var vPath:String = "pathToFileOnAndroid";

var fileUpload:File = new File(vpath);

var uploadURL:URLRequest = new URLRequest();

var uploadParams:URLVariables = new URLVariables();

uploadParams.type = 'file';

uploadURL.method = URLRequestMethod.POST;

uploadURL.data = uploadParams;

uploadURL.url = "https://www.yourdomain.com/​" + "uploadfile.php";

fileUpload.addEventListener( Event.COMPLETE, uploadComplete );

fileUpload.addEventListener( IOErrorEvent.IO_ERROR, fileuploadioError );

fileUpload.addEventListener( ProgressEvent.PROGRESS, progressHandler );

fileUpload.upload( uploadURL );

-----

the upload begins, can see it on the server in the php temp uploads directory, and it stops at 7,469 KB on the server. The progressHandler updates the local progressBar on the Android device, and stops at approx. the correct position of 7.4/total file size (ie. progress seems to be reporting correctly). After a while, the fileuploadIoError is triggered. Test files under 7 MB transfer ok, all over 7.5MB fail in this way. Note that on the backend, using the same url and php and server, uploads from Win and Mac succeed at 100 MB and more.

Spider22Author
Inspiring
May 27, 2016

I have tried several configurations on the Android, but I still get the maximum file size uploaded to be 7,469 kb. Is this a limitation on Air 22, on Android, on file.upload, or should I use a different method to upload?

Mayank_Gupta
Adobe Employee
Adobe Employee
May 31, 2016

Hello,

Thanks for reporting the issue, I tried this by making simple project and its working fine so Could you please share a sample project so that it will be helpful for us reproduce at our end ? and is it working fine for you using AIR 21 ?

Regards,

Mayank