Problems with network.upload( ) - Image File - Android 4.3

Hi

I have trouble with an uploading code. The idea is to upload a screen capture on to a server using the network.upload()

So i set-up already the php server to handle PUT request and everything it works fine. I can received the file from iOS.

On android it’s tricky:

For the the following device it works.

Galaxy Ace 3 – GT-S7270 -          480 x 800 - 4 inch       - Android 4.2

Galaxy Tab 3 - GTP5200 -           1280x800 - 10 inch      - Android 4.2.2

On this one it does not work:

Galaxy Note II – GT 7100 -            720 x 1280 - 5.5 inch - Android 4.3

Galaxy Nexus 19250XXLJ1 -        720 x 1280 - 4.65 inch - Android 4.3

Guess there’s a problem with android version 4.3

Here is the code:

 local url = "http://www.sompom.com/apple/put.php/"..filenameImage local method = "PUT" -- Set some reasonable parameters for the upload process: local params = { timeout = 60, progress = true, bodyType = "binary" } local filename = filenameImage print(filename) local baseDirectory = system.CachesDirectory local contentType = "image/png" --another option is "text/plain" local headers = {} headers.filename = filename params.headers = headers network.upload( url , method, uploadListener, params, filename, baseDirectory, contentType )

And for the permissions:

   “android.permission.READ_EXTERNAL_STORAGE”,

   “android.permission.WRITE_EXTERNAL_STORAGE”,

   “android.permission.ACCESS_ALL_EXTERNAL_STORAGE”,

   “android.permission.INTERNET”,

   “com.android.vending.BILLING”

Anybody got idea/feedback experience/psychological support (and/or) to bypass the issue?

Hi

Can’t really suggest anything code wise as I have never implemented something like this, but from my own experience I also have an android device running 4.3 that always seems to connection problems when I am calling web services in my app.

In general since this device was upgraded to Android 4.3 my network connection has been awful

Hi, yes it seems that there really is a problem related to the Android 4.3 concerning uploading stuff.

I see some other topics on other forums. Don’t have the links yet on hand, i will make an update with more details infos.

Hi

Can’t really suggest anything code wise as I have never implemented something like this, but from my own experience I also have an android device running 4.3 that always seems to connection problems when I am calling web services in my app.

In general since this device was upgraded to Android 4.3 my network connection has been awful

Hi, yes it seems that there really is a problem related to the Android 4.3 concerning uploading stuff.

I see some other topics on other forums. Don’t have the links yet on hand, i will make an update with more details infos.