Curl vs invoke-restmethod (with file upload)

I have the following Curl Code, and would lige to convert it to pure powershell, using the invoke-restmethod command

curl.exe -l http://<my server>/masking/api/file-formats -H “content-type: multipart/form-data” -H “Authorization: cd3bc892-421c-482f-8b63-1131d806ebf1” --form fileFormat=@E:/Tools/Powershell/Delphix/FileFormats/BS_REC00004_CSV.FF --form fileFormatType=DELIMITED

How can that be converted to invoke-restmethod?

Anyone, any ideeas?

 

 

 

You can refer to : https://powershell.org/forums/topic/curl-to-invoke-restmethod-conversion/