I have an application for iPhone / iPad made in MonoTouch, which is already in the Apple store. However, there is still a problem that has not been completely resolved. I need to be able to upload large files to our servers. Sizes can vary from 2 to 100 MB. I tried several approaches:
Using SOAP Web Services, sending an array of bytes: a) Sending the entire file. Crashed. b) Splitting in pieces of 1 MB. Failure after 10-15 pieces (varies).
Using WebClient.UploadFile. It works most of the time with smaller files <5 MB, but from time to time it crashes and more than 10-12 MB. On the server, I have an aspx page that receives information sent via POST
Here is the actual device code:
WebClient wc = new WebClient ();
string sLFN = sLocalFileName;
FileInfo fi = new FileInfo (sLFN)
string sUri = getUri ();
byte [] f = wc.UploadFile (sUri, sLFN)
I believe that the memory capacity of the iPhone / iPad directly affects this.
Does anyone have any recommendations or suggested approach that I should follow?
Thanks in advance
Edgar Herrador
source
share