Esempio n. 1
0
        //[ServiceFilter(typeof(ValidateMimeMultipartContentFilter))]
        public IActionResult UploadFiles(DwsFileUpload uploadInfo)
        {
            //try
            //{
            uploadInfo.SessionId = Request.Cookies["DwsSessionToken"];
            List <DwsFileInfo> fileinfo = FileRepository.SaveUploadFiles(uploadInfo);

            FileRepository.CommitTransaction();     //like to avoid this, but can't share transaction with Ajax!!?? TODO
            Response.StatusCode = 200;
            return(Json(fileinfo));

            //}
            //catch (Exception ex)
            //{
            //    Response.StatusCode = 500;
            //    var serverEx = new ServerException() { MiscException = ex };
            //    return PartialView("~/Views/Shared/_ServerError.cshtml", serverEx); ;
            //}
        }