Discussions

Ask a Question
Back to All

How can i submit Files with special characters?

Hi,

I am trying to upload a File with a special character using PowerShell and get:

{"success":false,"error":{"code":"api.documents.error.validation.failed","message":"","details":{"file":[{"code":"api.documents.error.validation.file.extension","message":"We do not accept files of this type"}]}}}

The code I use is something like this:

$Form = @{
title =theFileName
employee_id = 1234567
category_id = 123456
file = Get-Item C:\aFileWithÜ.pdf
}

Invoke-RestMethod -Uri $Uri -Method Post -Headers $header -ContentType 'multipart/form-data' -ResponseHeadersVariable response -Form $Form

When i rename the file to a name without "Ü", it works. Is this intended?