Last active
June 8, 2020 14:00
-
-
Save bjoerntx/12ed1ff7cd91536ba6a2e02acaad36a6 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
[Route("api/[controller]")] | |
[ApiController] | |
public class ViewerController : ControllerBase | |
{ | |
[HttpGet] | |
[Route("LoadDocument")] | |
public LoadedDocument LoadDocument() | |
{ | |
string documentName = "invoice.docx"; | |
LoadedDocument document = new LoadedDocument() | |
{ | |
DocumentData = Convert.ToBase64String( | |
System.IO.File.ReadAllBytes("App_Data/" + documentName)), | |
DocumentName = documentName | |
}; | |
return document; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment