Upload boot resources API

I’m trying to understand how I’ve to pass the image file via the POST /MAAS/api/2.0/boot-resources/ api call in order to upload a custom windows image.
From the documentation, I read that every POST request should use the “multipart/form-data” header but for that call the content file should use “application/octet-stream”. To my understanding, the latter is only used for binary files but at the begin of the documentation it’s specified to only send base64 encoded files. As I don’t have much experience in http calls this is quite confusing. Since the content parameter is optional, I’ve tried without it and it seems to be working; the gui updates the list of the images and starts to sync, so I’m excluding any other problem with other headers or parameters.
Here are the commands I’m using from powershell:

$timestamp = (Get-Date -Date ((Get-Date).DateTime) -UFormat %s)
$nonce = -join ((48..57) + (97..122) | Get-Random -Count 11 | % {[char]$_})
$sha = (Get-FileHash -Algorithm SHA256 .\windows2019cloudbase.vhdx).Hash
$size = (Get-Item .\windows2019cloudbase.vhdx).length

curl.exe http://[IP]:5240/MAAS/api/2.0/boot-resources/ -v -X POST -H 'Content-Type: multipart/form-data' -H 'Authorization: OAuth oauth_consumer_key="[key]",oauth_token="[token]",oauth_signature_method="PLAINTEXT",oauth_version="1.0",oauth_signature="[sign]",oauth_timestamp="'$timestamp'",oauth_nonce="'$nonce'"' -H 'Accept : */*' -F 'name=windows/win2019wim' -F 'architecture=amd64/generic' -F "sha256=$sha" -F "size=$size" -F 'filetype=tgz' -F 'base_image=windows2019' -F 'content=@"C:\[path]\win-image-b64.tar.gz"'

Doesn’t work and goes in timeout. I’ve also tried with Postman with the same results.
Does anybody have a working example or a suggestion for this?