I want to write a webservice that will upload a file to our server in chunks. In c# this would look something like this:
[WebMethod]
void UploadFile(string originalFilename, byte[] chunk, int numChunks)
{
//once: create folder based on unique android device id...
//once: create file with original filename's extension
//append chunk
//chunkCount++;
//once: if chunkCount == numChunks then file is complete
}
I have toy'd with a couple ideas for how to uniquely identify the device the incoming chunk is from.
- by ip adress, the downside to this as far as I know is a bad idea. I assume when the phone changes ip when it switches between radios.
- send a unique identifier... mac address kind of falls under the same category as above, and I heard ANDROID_ID is not unique enough.
anyone got any ideas?