{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-js/issues/666","labels_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/666/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/666/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/666/events","html_url":"https://github.com/aws/aws-sdk-js/issues/666","id":96598374,"number":666,"title":"S3: Uploaded gz file in bad format","user":{"login":"canhoviet","id":7037154,"avatar_url":"https://avatars.githubusercontent.com/u/7037154?v=3","gravatar_id":"","url":"https://api.github.com/users/canhoviet","html_url":"https://github.com/canhoviet","followers_url":"https://api.github.com/users/canhoviet/followers","following_url":"https://api.github.com/users/canhoviet/following{/other_user}","gists_url":"https://api.github.com/users/canhoviet/gists{/gist_id}","starred_url":"https://api.github.com/users/canhoviet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canhoviet/subscriptions","organizations_url":"https://api.github.com/users/canhoviet/orgs","repos_url":"https://api.github.com/users/canhoviet/repos","events_url":"https://api.github.com/users/canhoviet/events{/privacy}","received_events_url":"https://api.github.com/users/canhoviet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-22T15:43:25Z","updated_at":"2015-07-23T00:59:30Z","closed_at":null,"body":"Hi,\r\nI'm using AWS S3 api putObject to put a gz file to S3: \r\n```javascript\r\nvar fileStream = fs.createReadStream('a.tar.gz');\r\nvar param = {\r\n\t\tBody: fileStream,\r\n\t\tBucket: 'myBucket',\r\n\t\tKey: 'a.tar.gz'\r\n};\r\ns3.putObject(param, function(err, data){\r\n});\r\n```\r\nAfter running the code to put the file a.tar.gz to S3, I downloaded it from the bucket \"myBucket\" and verified that the download file and original file are in same size. I opened downloaded file using 7-Zip.  However, 7-Zip reported error: \"Can't open file a.tar.gz as archive\".  I was able to open the original file using 7-Zip.\r\n\r\nI tried adding some headers like: Content-Type: \"application/x-gzip\" , Content-Length: file length but it didn't work.\r\n\r\nMy environment:\r\n* Node: 0.12.7\r\n* aws sdk : 2.1.39\r\n\r\nAny idea on how  uploaded .gz file is in bad format ?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-js/issues/comments/123919624","html_url":"https://github.com/aws/aws-sdk-js/issues/666#issuecomment-123919624","issue_url":"https://api.github.com/repos/aws/aws-sdk-js/issues/666","id":123919624,"user":{"login":"AdityaManohar","id":966440,"avatar_url":"https://avatars.githubusercontent.com/u/966440?v=3","gravatar_id":"","url":"https://api.github.com/users/AdityaManohar","html_url":"https://github.com/AdityaManohar","followers_url":"https://api.github.com/users/AdityaManohar/followers","following_url":"https://api.github.com/users/AdityaManohar/following{/other_user}","gists_url":"https://api.github.com/users/AdityaManohar/gists{/gist_id}","starred_url":"https://api.github.com/users/AdityaManohar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdityaManohar/subscriptions","organizations_url":"https://api.github.com/users/AdityaManohar/orgs","repos_url":"https://api.github.com/users/AdityaManohar/repos","events_url":"https://api.github.com/users/AdityaManohar/events{/privacy}","received_events_url":"https://api.github.com/users/AdityaManohar/received_events","type":"User","site_admin":false},"created_at":"2015-07-23T00:59:29Z","updated_at":"2015-07-23T00:59:29Z","body":"@canhoviet I am not able to reproduce the issue with the code that you posted. Extracting the downloaded archive with `tar -xzf foobar.tar.gz` seems to work correctly for me. Are you able to extract the archive before uploading it with 7-Zip? "}}