I have created a Web API using .net core to POST file (excel).
When attaching the file from the post man it is working as expected but now I am trying to do the same using Azure logic app.
I am using a FTP connector and reading the file from it and then calling the REST api, the end point is getting hit but however I am unable to get the file data.
I am very much new to logic apps and tried to find a lot but no luck.
Web API
[HttpPost("x")]
public async Task<IActionResult> MigrateHistoricalData()
{
int filesCount = HttpContext.Request.Form.Files.Count;
if (filesCount > 0)
{
var file = HttpContext.Request.Form.Files[0];
if (file != null && file.Length > 0)
{
// other logic
}
}
else
{
return new BadRequestObjectResult("No files found in the request.");
}
return null;
}