Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created March 21, 2024 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/4687277552e947c6407b131d9caa997a to your computer and use it in GitHub Desktop.
Save bjoerntx/4687277552e947c6407b131d9caa997a to your computer and use it in GitHub Desktop.
[HttpPost]
[Route("Save")]
public bool Save([FromBody] DocumentData documentData)
{
// save the file to App_Data
var file = Path.Combine("App_Data", documentData.Name);
System.IO.File.WriteAllBytes(file, Convert.FromBase64String(documentData.Data));
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment