我的文件在Angular end中采用以下格式:
let fi = this.fileInput.nativeElement;
let fileToUpload = fi.files[0];
let input = new FormData();
input.append("file", fileToUpload);
return this.http.post(uploadUrl, input);
我在ASP.NET CORE中的API是:
[HttpPost]
public IActionResult Post([FromBody]JObject objData)
{
dynamic jsonData = objData;
JObject FileJson = jsonData.jsonFile; // JSON File
// Please suggest how to store the file in Folder
}
提前致谢