我有音乐服务,可以获取音乐的文件流,并且运行良好:
[HttpGet("GetMusicFileByIdAsync")]
public async Task<IActionResult> GetMusicFileByIdAsync([FromQuery]Guid guid)
{
var result = await _logic.GetMusicFileAsync(guid);
if (result.Error != null)
{
return BadRequest(result);
}
return File(result.Data.Bytes, result.Data.ContentType);
}
但是还有一个网关必须处理FileContentResult。通过调试,我看到内容类型是正确的,RawBytes是正确的,但是在属性restResponse的内容中看起来像是编码符号。
Debbuging screen of restResponse properties 并在进行序列化时,出现500个内部错误,描述为:“解析Infinity值时出错。路径”,第1行,位置1”