Created
July 18, 2018 11:44
-
-
Save bjoerntx/cf238a23f5a7c1422e91b7ed5e8c9fbb 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] | |
public IActionResult Template([FromQuery] TemplateRequest templateRequest) | |
{ | |
// create a ReportingCloud object with stored API-Key | |
ReportingCloud rc = new ReportingCloud(RCSettings.APIKey); | |
// download document from ReportingCloud template storage | |
byte[] document = rc.DownloadTemplate(templateRequest.TemplateName); | |
// return Base64 string version | |
return new OkObjectResult(Convert.ToBase64String(document)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment