-
Couldn't load subscription status.
- Fork 284
Closed
Description
var s3 = require('s3') // s3 is an initialized knox S3 Client instance
var fs = require('fs')
var file = '/Users/nrajlich/Pictures/avatar.jpg'; // This is a valid JPG file that does exist
var headers = {};
headers['Content-Type'] = 'image/jpeg';
var res = fs.createReadStream(file);
var s3req = s3.putStream(res, '/nate-avatar.jpg', headers, function(err, s3res){
if (err) throw err;
console.log(s3res.statusCode);
console.log(s3res.headers);
s3res.pipe(process.stdout, {end: false});
console.error('s3 callback', s3req.url);
});
s3req.on('progress', console.log);Using knox v0.3.0, this script makes S3 return a 501 error code, with the following XML body:
<Error>
<Code>NotImplemented</Code>
<Message>A header you provided implies functionality that is not implemented</Message>
<Header>Transfer-Encoding</Header><RequestId>7A05E23CB3DBBD1E</RequestId>
<HostId>Dylx7eIcmXceZCEOZKmMxpGclu2i5bsdlV6pdyH8uAzNm+DAXPE/vdrFkFwFaHht</HostId>
</Error>Not sure if this is misuse on my part or a problem with knox, but it's kinda holding me up at the moment :)
Metadata
Metadata
Assignees
Labels
No labels