{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/2920","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/2920/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/2920/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/2920/events","html_url":"https://github.com/kennethreitz/requests/issues/2920","id":120875099,"number":2920,"title":"POST to S3 Bucket Returning 403","user":{"login":"JKulakofsky","id":7862740,"avatar_url":"https://avatars.githubusercontent.com/u/7862740?v=3","gravatar_id":"","url":"https://api.github.com/users/JKulakofsky","html_url":"https://github.com/JKulakofsky","followers_url":"https://api.github.com/users/JKulakofsky/followers","following_url":"https://api.github.com/users/JKulakofsky/following{/other_user}","gists_url":"https://api.github.com/users/JKulakofsky/gists{/gist_id}","starred_url":"https://api.github.com/users/JKulakofsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JKulakofsky/subscriptions","organizations_url":"https://api.github.com/users/JKulakofsky/orgs","repos_url":"https://api.github.com/users/JKulakofsky/repos","events_url":"https://api.github.com/users/JKulakofsky/events{/privacy}","received_events_url":"https://api.github.com/users/JKulakofsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-07T21:45:21Z","updated_at":"2015-12-07T21:53:56Z","closed_at":null,"body":"I am writing a program that will POST a file to a website that is making me go through a few steps to get the file properly uploaded.  In the first step, I perform a simple POST which alerts the site that a file will be uploaded and returns a URL to an S3 bucket, along with some more response content.  The next step is to POST the file to the URL returned in step one, and this is where things break.  An abbreviated version of my code is as follows:\r\n```\r\nurl = 'https://myurl.s3.amazonaws.com/'\r\npayload = {all of the content returned from step one, minus the URL}\r\nfile = {'file': open('C:\\...\\file_name.imscc', 'rb')}\r\nr = requests.post(url, data=payload, files=file)\r\n```\r\nAt this point the code waits for about 15-20 seconds and then gives back a 403 error.  My initial thought was that the file was too large (about 18.58MB) so I tried to use the Multipart Encoder from the Requests Toolbelt.  When I ran this code:\r\n```\r\nm = MultipartEncoder(fileds={the same values as above, 'file': (files[0], open('C:\\Users\\jonathan.kulakofsky\\Documents\\Code\\Downloads\\\\' + files[0], 'rb'))})\r\n```\r\nI got a Traceback Error that ended with `'Connection aborted.', error(10054, 'An existing connection was forcibly closed by the remote host')`.\r\n\r\nAs far as I can tell, I am passing the proper authentication key back to Amazon with the rest of the fields in the payload.  Does anyone have any ideas why I'm getting these errors?"},"comment":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/comments/162676983","html_url":"https://github.com/kennethreitz/requests/issues/2920#issuecomment-162676983","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/2920","id":162676983,"user":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars.githubusercontent.com/u/1382556?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T21:53:56Z","updated_at":"2015-12-07T21:53:56Z","body":"Are you sure? You're definitely still posting the data, which suggests you do need the multipart encoding.\r\n\r\nIs there any documentation for this API anywhere?"}}