0
Answered

API input parameter is a IFormFile - file uploaded to the API call in POST

Andavan Ivan 7 ár síðan í Studio Uppfært 7 ár síðan 7

My API POST requires an input parameter which is a multipart file - IFormFile (c#). In postman client, I use Body -> Forms Data -> choose type as file and post the file as input parameter. How can I use POST on WareWolf to upload a file as the parameter input?

tool service web studio workflow variables

Answer

Answer

Hi,


Unfortunately at present you cannot specify the type of the POST parameter and so Warewolf will not POST it correctly to you webservice.


We will look into how a feature like this can be implemented and add it into our backlog.


Thanks

Under review

Hi,


Are you trying to POST a file to a Warewolf service or are you trying to POST the file to another web service using the POST tool in Warewolf?


Maybe a high level overview of what you are trying to achieve will help?


Thanks

Hi,


I am posting to another web service using the POST tool in Warewolf. I have an external API programmed in C# which take the first parameter IFormFile (uploaded file).


https://docs.asp.net/projects/api/en/latest/autoapi/Microsoft/AspNetCore/Http/IFormFile/


Detail above is a sample implementation of how IFormFile works.


Thank you

Answer

Hi,


Unfortunately at present you cannot specify the type of the POST parameter and so Warewolf will not POST it correctly to you webservice.


We will look into how a feature like this can be implemented and add it into our backlog.


Thanks

Can you guide me to where I can look for extending WW for this functionality. Happy to lend a hand to developing this feature for the opensource community.