From: Cory Benfield Date: Wed, 28 May 2014 15:59:57 +0000 (+0100) Subject: Ensure that we open files in binary mode. X-Git-Tag: v2.4.0~45^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2413e010f4d2dd5fa4cfcc85427a47a67fc8b01;p=services%2Fpython-requests.git Ensure that we open files in binary mode. --- diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index eead69e..f384f15 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -229,7 +229,7 @@ Streaming Uploads Requests supports streaming uploads, which allow you to send large streams or files without reading them into memory. To stream and upload, simply provide a file-like object for your body:: - with open('massive-body') as f: + with open('massive-body', 'rb') as f: requests.post('http://some.url/streamed', data=f)