A client will be issuing a GET request to our web api service, and we need to respond to that request with the specified file.
The file content will be as byte array like:
byte[] fileContent = Convert.FromBase64String(retrievedAnnotation.DocumentBody);
How do I respond to GET request with the above file content as a file?
I've stubbed out a controller:
[Route("Note({noteGuid:guid})/attachment", Name = "GetAttachment")]
[HttpGet]
public async Task<object> GetAttachment(Guid noteGuid)
{
return new object();
}
Instead of the new object, how do I return the fileContent to the GET request?