Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created October 18, 2023 10:32
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/ea8caef2612ef1d23b6db9805273581c to your computer and use it in GitHub Desktop.
Save bjoerntx/ea8caef2612ef1d23b6db9805273581c to your computer and use it in GitHub Desktop.
[HttpPost]
public IActionResult ReceiveDocument(string document)
{
// convert string to byte array and save as file
System.IO.File.WriteAllBytes("document.pdf", Convert.FromBase64String(document));
return Ok();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment