Bernhard
09/27/2024, 8:28 AMclient.post("<https://uploads.github.com/repos/BernhardPosselt/foundryvtt-kotlin/releases/177235411/assets?name=release.zip>") {
url {
parameters.append("name", "release.zip")
}
contentLength()
contentType(ContentType.Application.Zip)
accept(ContentType.Application.Json)
bearerAuth(githubToken)
setBody(archive.readChannel())
}
and this is the working curl call:
curl -L \
-X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/zip" \
"<https://uploads.github.com/repos/BernhardPosselt/foundryvtt-kotlin/releases/177235411/assets?name=release.zip>" \
--data-binary "@build/release.zip"
Is filechannel the issue since that does not read the entire file into memory?
Edit: Ok, looks like Content-Length is not set
Edit 2: Setting Content-Length headers manually made it work