/// <summary>
        /// Получаем всю дополнительную информацию, связанную с текущим загружаемым на с ервер файлом
        /// </summary>
        /// <returns></returns>
        public static ResultMvcUpload GetResultMvcUpload(HttpContext context)
        {
            ResultMvcUpload ret             = null;
            var             hashUploadTable = context.Session.GetObjectFromJson <List <ResultMvcUpload> >("HashUploadTable") ?? new List <ResultMvcUpload>();

            foreach (var upload in hashUploadTable)
            {
                if (upload.name != FileName)
                {
                    continue;
                }
                ret = upload;
                break;
            }
            // Debug!
            if (ret == null)
            {
                // Не должно такого быть
                return(null);
            }
            return(ret);
        }
        /// <summary>
        /// Сохранить загружаемый файл на диск
        /// </summary>
        /// <param name="path"></param>
        /// <param name="request"></param>
        public static ResultMvcUpload UploadToDisk(string path, HttpContext context)
        {
            var request = context.Request;
            var file    = request.Form.Files[0];
            // ReSharper disable once AssignNullToNotNullAttribute
            var fullName = Path.Combine(path, path2: Path.GetFileName(FileName));

            using (var fs = new FileStream(fullName, FileMode.Create, FileAccess.Write))
            {
                fs.Write(_fileContent, 0, MaxBufferSize);
                fs.Flush();
            }
            var ret = new ResultMvcUpload(context)
            {
                id   = (Guid.NewGuid()).ToString(),
                name = FileName,
                // ReSharper disable once PossibleNullReferenceException
                size       = _uploadParseResult == UploadParseResult.FirstChunk ? FileSize : (int)file.Length,
                eof        = Eof,
                Parameters = new Dictionary <string, dynamic>()
            };

            foreach (string s in request.Form.Keys)
            {
                ret.Parameters.Add(s, request.Form[s]);
            }


            if (_uploadParseResult == UploadParseResult.FirstChunk)
            {
                var hashUploadTable = context.Session.GetObjectFromJson <List <ResultMvcUpload> >("HashUploadTable") ?? new List <ResultMvcUpload>();
                hashUploadTable.Add(ret);
                context.Session.SetObjectAsJson("HashUploadTable", hashUploadTable);
            }
            return(ret);
        }