From 9fc3c4cb6745430227db302577da8680cb617486 Mon Sep 17 00:00:00 2001 From: Alya Sirko Date: Tue, 20 Sep 2022 07:30:09 +0300 Subject: [PATCH] fix attachments names --- ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.py b/ci.py index ac34eb8a..5fe92aed 100755 --- a/ci.py +++ b/ci.py @@ -79,7 +79,7 @@ def gitea_upload_attachment(file): id = gitea_get_release_id() url = f"{GITEA_HOST_URL}/api/v1/repos/{GITEA_REPO_FULL}/releases/{id}/assets" token = os.environ.get("GITEA_RELEASE_TOKEN") - params = {"access_token": f"{token}", "name": f"{file}"} + params = {"access_token": f"{token}", "name": f"{os.path.basename(file)}"} files = {"attachment": open(f"{file}", "br")} request = requests.post(url, params=params, files=files)