From ASP .NET Core MVC I need to send request to API endpoint which requires multipart/form-data with the following format
{boundary value}
Content-Disposition: form-data; name='file'; filename='filename.jpg'
Content-Type: image/jpeg
{file content}
--{boundary value}--
Within controller, I have uploaded the file as IFormFile interface which has properties:
Content-Type
ContentDisposition
How can I construct multipart/form-data and send it?
I've tried to use MultipartFormDataContent which has overloaded constructor with string boundary but without success.