Show More
@@ -12,6 +12,7 b' import sys' | |||
|
12 | 12 | import requests |
|
13 | 13 | import getpass |
|
14 | 14 | import json |
|
15 | from pathlib import Path | |
|
15 | 16 | |
|
16 | 17 | try: |
|
17 | 18 | import requests_cache |
@@ -274,7 +275,7 b' def encode_multipart_formdata(fields, boundary=None):' | |||
|
274 | 275 | def post_download(project, filename, name=None, description=""): |
|
275 | 276 | """Upload a file to the GitHub downloads area""" |
|
276 | 277 | if name is None: |
|
277 |
name = |
|
|
278 | name = Path(filename).name | |
|
278 | 279 | with open(filename, 'rb') as f: |
|
279 | 280 | filedata = f.read() |
|
280 | 281 |
General Comments 0
You need to be logged in to leave comments.
Login now