From: Cheng Zhao Date: Tue, 15 Oct 2013 01:04:05 +0000 (+0800) Subject: Use stream-uploading to upload the asset to GitHub. X-Git-Tag: v0.6.2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=61b2377cf2c02f1143bd0d73bb68231af1e0d18e;p=electron.git Use stream-uploading to upload the asset to GitHub. --- diff --git a/script/upload.py b/script/upload.py index 026abb14..ac95a485 100755 --- a/script/upload.py +++ b/script/upload.py @@ -135,9 +135,8 @@ def upload_atom_shell(github, release_id, file_path): params = {'name': os.path.basename(file_path)} headers = {'Content-Type': 'application/zip'} with open(file_path, 'rb') as f: - data = f.read() github.repos(ATOM_SHELL_REPO).releases(release_id).assets.post( - params=params, headers=headers, data=data, verify=False) + params=params, headers=headers, data=f, verify=False) def publish_release(github, release_id):