public async Task <IActionResult> Download(string file) { var thumbnail = Request.Query.ContainsKey("thumbnail"); var bp = new BusinessParam(_hostEnvironment); return(await FileFacade.GetInstance().Download(file, bp, thumbnail)); }
public ServiceResult <object> Save(FileDto dto) { var userInfo = _userSessionManager.GetUserInfo(dto.Ticket, Request); var bp = new BusinessParam(userInfo); var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz, dto.EntityId == 0 ? "insert" : "update"); return(checkAccess.Done ? FileFacade.GetInstance().Save(bp, dto) : checkAccess); }
public ServiceResult <object> CreateFolder(FolderDto dto) { var userInfo = _userSessionManager.GetUserInfo(dto.Ticket, Request); var bp = new BusinessParam(userInfo, _hostEnvironment); var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz, "insert"); return(checkAccess.Done ? FileFacade.GetInstance().CreateFolder(bp, dto) : checkAccess); }
public ServiceResult <object> GetAllExtension(Clause clause) { var userInfo = _userSessionManager.GetUserInfo(clause.Ticket, Request); var bp = new BusinessParam(userInfo, clause); var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz, "gridView"); return(checkAccess.Done ? FileFacade.GetInstance().GetAllExtension(bp) : checkAccess); }
public ServiceResult <object> CreateFile() { var ticket = Request.Form["ticket"]; var userInfo = _userSessionManager.GetUserInfo(ticket, Request); var bp = new BusinessParam(userInfo, _hostEnvironment); var checkAccess = _userSessionManager.CheckAccess(bp, ClassDetails[0].Clazz, "insert"); return(checkAccess.Done ? FileFacade.GetInstance().CreateFile(bp, Request).Result : checkAccess); }