Ejemplo n.º 1
0
        public JsonResult Image()
        {
            var image    = Request.Form.Files.FirstOrDefault(file => file.IsValidImage());
            var response = Service.UploadFormFile(image, Constants.ImagesFolderPath);

            return(Json(response));
        }
Ejemplo n.º 2
0
        public IActionResult UploadBackup()
        {
            var backup = Request.Form.Files.FirstOrDefault(file => file.IsValidZipFile());

            UploadService.UploadFormFile(backup, Constants.BackupFolderPath);
            return(RedirectToAction(nameof(ViewBackups)));
        }