public IActionResult UploadFiles(string root, string folders = "") { RootUploadFilesViewModel model = new RootUploadFilesViewModel(); model.ParentFolderPath = folders; model.Root = root.ToFirstUpper(); return(this.View(model)); }
public async Task <IActionResult> UploadFile(string root, [FromForm(Name = "file")] IFormFile formFile, RootUploadFilesViewModel model) { model.Root = root.ToFirstUpper(); string saveDirectory = model.ParentFolderPath.Replace('/', Path.DirectorySeparatorChar); bool publicRoot = root == "public"; return(this.UploadFileResponse(await this.Mediator.Send(new UploadFileCommand(formFile, saveDirectory, publicRoot)))); }