public async Task <ActionResult> SaveAsset(AssetUploadModel model) { if (model.File != null) { await storageService.SaveFileAsync(model.SiteId.ToString(), model.File.FileName, model.File.InputStream, model.File.ContentType); } return(Json("Saved", JsonRequestBehavior.AllowGet)); }
public IActionResult Post([FromBody] BlazorFile file) { _logger.LogDebug("Saving file..."); _azureFile.SaveFileAsync(file); _logger.LogDebug("File saved!"); return(Ok()); }