Fix asset upload: use multipart/form-data (-F) not raw binary

This commit is contained in:
Ullrich Schäfer 2026-05-10 21:11:48 +02:00
parent a852a0acfb
commit de21ca4779
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -161,9 +161,8 @@ jobs:
name=$(basename "$diff" | sed 's/-diff-chromium-[a-z]*\.png//' | sed 's/-/ /g')
response=$(curl -s -w "\n%{http_code}" -X POST \
-H "Authorization: Bearer $VISUAL_DIFF_TOKEN" \
-H "Content-Type: image/png" \
-H "Accept: application/json" \
--data-binary @"$diff" \
-F "file=@$diff;type=image/png" \
"https://uploads.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/assets?name=$(basename $diff)")
http_code=$(echo "$response" | tail -1)
body_resp=$(echo "$response" | head -1)