Skip to content
This repository was archived by the owner on Dec 17, 2019. It is now read-only.

Commit 1512a25

Browse files
pabelangercopitux
authored andcommitted
refs copitux#17. Fix bug with uploading to s3
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
1 parent ce2dc1a commit 1512a25

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pygithub3/services/repos/downloads.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def create(self, data, user=None, repo=None):
7272
# TODO: improve it. e.g Manage all with file desc
7373
def upload(file_path):
7474
""" """
75-
body = download.ball_to_upload()
76-
body['file'] = (file_path, open(file_path, 'rb'))
77-
return requests.post(download.s3_url, files=body)
75+
data = download.ball_to_upload()
76+
files = {'File': open(file_path, 'rb')}
77+
return requests.post(download.s3_url, data=data, files=files)
7878

7979
download.upload = upload
8080
return download

requirements/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
requests >= 0.12.1
1+
requests >= 0.13.1

0 commit comments

Comments
 (0)