Пример #1
0
        public ActionResult PreservationUploadCloseFiles(IEnumerable <HttpPostedFileBase> files, string metaData, string messageId)
        {
            return(ActionResultHelper.TryCatchWithLogger(() =>
            {
                if (string.IsNullOrEmpty(metaData))
                {
                    _uploadHelper.UploadSave(files);
                    return Content(string.Empty);
                }

                Models.FileResult fileBlob = _uploadHelper.ChunkUploadSave(files, metaData, messageId);
                if (fileBlob.Uploaded)
                {
                    fileBlob.ExtraDescription = UnZipPreservationFile(fileBlob.FileName);
                    _uploadHelper.RemoveUploadedFile(fileBlob.FileName, messageId);
                }
                return Content(JsonConvert.SerializeObject(fileBlob), System.Net.Mime.MediaTypeNames.Text.Plain);
            }, _loggerService));
        }