Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to set default object ACL on GCS upload #1178

Closed
asciimike opened this issue Mar 22, 2016 · 2 comments
Closed

Be able to set default object ACL on GCS upload #1178

asciimike opened this issue Mar 22, 2016 · 2 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API.

Comments

@asciimike
Copy link

Currently, there's no way to set the predefined object ACL on an object that is being uploaded (though there is in the REST API). One can overwrite the metadata with a new ACL, but that is a hard overwrite, and doesn't preserve existing ACLs, unlike add default ACL. It would be neat if we had an API that worked like:

var options = {
  predefinedAcl:'publicRead',
  validation: 'crc32',
  metadata: {/* add metadata here */}
};

bucket.upload('local/path/to/bar.txt', options, function(err, file) {
  // File is publicly readable!
});
@stephenplusplus
Copy link
Contributor

Sounds like a good idea to me!

@stephenplusplus
Copy link
Contributor

Sent a PR for this, feel free to test it out!

$ npm install --save stephenplusplus/gcloud-node#spp--1178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API.
Projects
None yet
Development

No branches or pull requests

3 participants