Search Unity

WWW Upload Android Issue

Discussion in 'Scripting' started by Conflei, May 28, 2015.

  1. Conflei

    Conflei

    Joined:
    Apr 21, 2013
    Posts:
    44
    Hello everyone, i'm working on a project and i'm trying to upload some data via WWW.

    On iOS it's working pretty fine, i'm actually uploading videos to my server without any problems (3mb videos on byte array), but on Android i'm having one trouble, after upload the first two videos my phone won't upload any other one, with any error on the upload, it seems has a success but no file were uploaded, even when the upload was apparently completed.

    If i clean my data app from the settings of my phone it works fine again, i don't know where it's the problem, i really need some help here, maybe if there is a way to clean the data of my app from inside the Unity API i can make it work... I don't know...

    S.O.S...
     
  2. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    I had a similar issue with downloading but don't know if it's the same problem, it was related to the cache. To get it working consistently I had to change the URL i uploaded to each time otherwise it wouldn't work. I did this by adding a random number onto the end which forced the OS to treat it as a new request. e.g.

    www.example.com/upload.php becomes

    www.example.com/upload.php?r=2394872349
     
    Conflei likes this.
  3. Conflei

    Conflei

    Joined:
    Apr 21, 2013
    Posts:
    44
    Thanks!