Network.request problem with large files...

Hi there,

I’m having major problem uploading large files using network.request. My code is allowing the user to upload recorded audio to a web service. The audio is recorded using the device’s microphone, saved into the documents directory and then encoded using base64 into a string to be uploaded. I then decode at the other end using a web service built in ASP.Net and save the decoded audio to the server.

If the amount of data I’m trying to upload gets into the region of 25Mb (precise amount I recorded was 25355016 bytes) then the event listener only fires once on the “progress” phase and then doesn’t fire again. It’s like it gets stuck and hangs at this point.

If I get the amount of data down to 10Mb it works fine.

I’ve set my timeout value to be way longer than required and we’re getting nowhere near that amount of time when the event listener stops receiving progress events. It’s almost instant, as soon as it starts.

Here is my code for my listener… all looks pretty normal and boring, right?

function fileUploadListener( event )    local phase = event.phase; if (phase == "began") then     -- Do some stuff elseif (phase == "progress") then     -- Updated progress     print(event.bytesTransferred, fileSize); -- filesize is the size of the encrypted file we're uploading. elseif (phase == "ended") then     -- Do some more stuff end

My network request is called like this:

local requestId = network.request( https://www.mysite.com/script.svc, "POST", fileUploadListener,  params);

As I say, it works perfectly with smaller file sizes. The web.config file on the server has a large file size limit set and a long timeout.
 

Does anyone have any idea what might be causing this to fail on large file sizes when it work perfectly with smaller ones?

Many thanks in advance.

Ian