Created
March 21, 2024 13:34
-
-
Save bjoerntx/3b2dc31272b3deeaba2d62aa6e62f647 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpGet] | |
[Route("Load")] | |
public DocumentData Load(string name) | |
{ | |
// load the file from App_Data | |
var file = Path.Combine("App_Data", name); | |
var data = new DocumentData | |
{ | |
Name = name, | |
Data = Convert.ToBase64String(System.IO.File.ReadAllBytes(file)), | |
}; | |
return data; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment