I am unable to attach an image to a request using a powershell script and the API. This works just fine in BASH. I can use the following bash script with no issue:
But when I made this same request using powershell, I receive an internal error. This is my script below:
$headers = @{
"authtoken" = "ABC123"
}
$file = "C:\filepath"
$result = Invoke-RestMethod -Method Put -Uri $url -Headers $headers -InFile $file
Does anyone know what I might be doing wrong here? This is the error I'm getting:
{"response_status":{"status_code":4000,"messages":[{"status_code":4004,"type":"failed","message":"Internal error"}],"status":"failed"}}