Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Commit

Permalink
refs #17. Fix bug with uploading to s3
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
  • Loading branch information
pabelanger authored and copitux committed Jun 28, 2012
1 parent ce2dc1a commit 1512a25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pygithub3/services/repos/downloads.py
Expand Up @@ -72,9 +72,9 @@ def create(self, data, user=None, repo=None):
# 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
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
@@ -1 +1 @@
requests >= 0.12.1
requests >= 0.13.1

0 comments on commit 1512a25

Please sign in to comment.