コード例 #1
0
 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));
 }
コード例 #2
0
        public IActionResult Post([FromBody] BlazorFile file)
        {
            _logger.LogDebug("Saving file...");
            _azureFile.SaveFileAsync(file);

            _logger.LogDebug("File saved!");

            return(Ok());
        }