Change content-type to multipart/form-data

This commit is contained in:
Reza Behzadan 2024-03-31 12:58:09 +03:30
parent b336e820f9
commit 45ea43f32f

2
Jenkinsfile vendored
View File

@ -44,7 +44,7 @@ pipeline {
def releaseID = parsedResponse.id def releaseID = parsedResponse.id
sh """ sh """
curl -X POST -H "Authorization: token ${GITEA_API_TOKEN}" -H "Content-Type: application/octet-stream" \\ curl -X POST -H "Authorization: token ${GITEA_API_TOKEN}" -H "Content-Type: multipart/form-data" \\
--data-binary @${zipFile} \\ --data-binary @${zipFile} \\
"https://git.behzadan.ir/api/v1/repos/${repoOwner}/${repoName}/releases/${releaseID}/assets?name=${zipFile}" "https://git.behzadan.ir/api/v1/repos/${repoOwner}/${repoName}/releases/${releaseID}/assets?name=${zipFile}"
""" """