我想在我的 .net core 2.2 web 應用程序中為多部分請求實現端點。端點應接收模型和圖像。[HttpPost][Consumes("multipart/form-data")]public async Task<IActionResult> Post(Model request, IFormFile file){ // some action}public class Model{ public string FirstProperty { get; set; } public string SecondProperty { get; set; }}此端點始終返回 415(不支持的媒體類型)。我知道 .net core 2.2 ( https://github.com/aspnet/AspNetCore/issues/4396 ) 中的問題。這個問題有解決方法嗎?
- 1 回答
- 0 關注
- 93 瀏覽
添加回答
舉報
0/150
提交
取消