Open hems opened 8 years ago
+1
@ChristianRich i end up with something more less like this:
params =
Bucket: s.s3.bucket
Key : object_id
ACL : 'private'
s3.putObjectAcl params, ( error, data ) ->
if error then return callback? error
if callback?
callback null, data
It'd be awesome if you submitted a PR with this addition
hey, this is available already..
var client = s3.createClient({
s3Options: {
accessKeyId: process.env.S3_ACCESS_KEY,
secretAccessKey: process.env.S3_SECRET
}
});
var params = {
localFile: `dist/${file}`,
s3Params: {
ACL:'public-read',
Bucket: process.env.S3_BUCKET,
Key: `${argv.version}/${file}`
}
};
var uploader = client.uploadFile(params);
uploader.on('error', function(err) {
console.error("unable to upload:", err.stack);
});
uploader.on('progress', function() {
console.log("progress", uploader.progressMd5Amount,
uploader.progressAmount, uploader.progressTotal);
});
uploader.on('end', function() {
console.log("done uploading");
});
I just noticed this method isn't implemented, is there any way of setting ACL permissions to private using this library?
Thank you