Skip to content

Commit

Permalink
🐛 上传路径错误
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkioTomas committed Aug 26, 2024
1 parent 802c174 commit 605c913
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ def upload(filename, filename_new):
'Authorization': os.getenv("ALIST_TOKEN"),
'file-path': filename_new
}
dir = os.getenv("GITHUB_WORKSPACE")
# 读取文件内容
with open(dir+filename, 'rb') as file:
with open(filename, 'rb') as file:
file_data = file.read()
res = requests.put(url=url2, data=file_data, headers=headers)
print(res.text)
Expand Down

0 comments on commit 605c913

Please sign in to comment.