From 1512a25cf87603e82085c38b679000b34bc446a0 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Sun, 24 Jun 2012 15:54:54 -0400 Subject: refs #17. Fix bug with uploading to s3 Signed-off-by: Paul Belanger --- pygithub3/services/repos/downloads.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pygithub3') 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 -- cgit v1.2.3-59-g8ed1b