aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3
diff options
context:
space:
mode:
authorPaul Belanger <paul.belanger@polybeacon.com>2012-06-24 15:54:54 -0400
committerDavid Medina <davidmedina9@gmail.com>2012-06-28 23:20:04 +0200
commit1512a25cf87603e82085c38b679000b34bc446a0 (patch)
treea4034b43d2702acc84340b576e7aaee58b8386c1 /pygithub3
parent:sparkles: Release 0.4 :sparkles: (diff)
downloadpython-github3-1512a25cf87603e82085c38b679000b34bc446a0.tar.xz
python-github3-1512a25cf87603e82085c38b679000b34bc446a0.zip
refs #17. Fix bug with uploading to s3
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Diffstat (limited to 'pygithub3')
-rw-r--r--pygithub3/services/repos/downloads.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pygithub3/services/repos/downloads.py b/pygithub3/services/repos/downloads.py
index 47c7785..25114a5 100644
--- a/pygithub3/services/repos/downloads.py
+++ b/pygithub3/services/repos/downloads.py
@@ -72,9 +72,9 @@ class Downloads(Service):
# TODO: improve it. e.g Manage all with file desc
def upload(file_path):
""" """
- body = download.ball_to_upload()
- body['file'] = (file_path, open(file_path, 'rb'))
- return requests.post(download.s3_url, files=body)
+ data = download.ball_to_upload()
+ files = {'File': open(file_path, 'rb')}
+ return requests.post(download.s3_url, data=data, files=files)
download.upload = upload
return download