0

I have a file upload system and when I upload anything over 1.2GB even when using chunking at 20mb a chuck, I get a inputstream error when 75% uploaded. I am using the below and them merging the files once uploaded. I am guessing .net isn't dispose of the previous chucks and getting itself out of memory. any suggestions?

        public ActionResult UploadChuck(HttpPostedFileBase file)
        {
            var filePath = "xxxx";
            using (var fileStream = System.IO.File.OpenWrite(filePath))
            {
                inputStream.CopyTo(file.InputStream);
            }
        }
lee
  • 738
  • 1
  • 7
  • 18
  • At 20mb per chunk you are likely to reach the upper bounds of the large object heap.. what exception are you getting? – Simon Whitehead Apr 15 '14 at 09:25
  • I have tried at 5mb and 10mb and the same thing happens, it just hangs at between 27%-32%. in the method the file based is null (even though the posted request exists with file data). I did a check for the file == null and return a badrequest for the uploader to retry again but still hangs – lee Apr 15 '14 at 14:39

0 Answers0