【发布时间】:2019-01-08 23:33:33
【问题描述】:
我正在使用此代码在 Web API 中上传文件。但是我发布的文件显示为 Null。也许是因为代码在邮递员中需要多个文件。我需要通过邮递员上传单个文件,而不是文件列表。我正在分享代码。
[HttpPost]
[Route("Upload")]
public async Task<IActionResult> Upload(string targetIdStr, string feedType,
string contentType, string dateCreated, string description, List<IFormFile> files)
【问题讨论】:
-
客户端中的代码如何提交你的文件?
标签: c# postman asp.net-core-webapi