I need to upload files in background for my application.
So i looked uploadtask method but it actually need a fileurl to work with background transfert. It won't really be a big deal to put my object in JSON/XML and save it as a file but it would need a change in my server side.
However, i notice that there is a way to upload file using the downloadtask which additionally return the body response.
Basically, i would create my object in memory and adding it as NSData (byte[]) in my download request. It actually worked but i fear that there may be memory/connection bug since it's not only file on disk but also memory and we are in a background status...
Is this a correct way to do it ?? or i may have connection problem ?
Thanks!