I'm creating an Azure function that will unzip a zip file full of .csv files, parse the contents, and save data to a database. I'm stuck on the very first step: unzip a zip file.
After reading lots of other threads (including Azure downloadtostreamasync method hangs) this is what I have:
public async static Task<MemoryStream> GetMemoryStreamAsync(CloudFile inBoundfile)
{
MemoryStream memstream = new MemoryStream();
await inBoundfile.DownloadToStreamAsync(memstream).ConfigureAwait(false);
return memstream;
}
The zip file I'm testing with is 515,069KB. When that method is called, it seems to just hang, but eventually throws an Out of Memory exception. I've also tried doing it non-async (which throws the same error) and I've tried it w/o the .ConfigureAwait(false)
, and in that case, it throws an error with something like directory corrupt
(or somethin'.. I forget what exactly).
Oh, I also found a thread that said to put the Azure App at 64bit, which I did.
There MUST be a solution, but I'm not finding it!!