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

storage: support setting public/private at time of upload #1278

Merged
merged 1 commit into from
May 2, 2016

Conversation

stephenplusplus
Copy link
Contributor

@stephenplusplus stephenplusplus commented May 2, 2016

Fixes #1178 (whoa, exactly 100 issues/PRs ago!)

Set the predefinedAcl at the time of upload:

bucket.upload(filepath, { predefinedAcl: 'authenticatedRead' }, function(err, file) {})

var writeStream = file.createWriteStream({ predefinedAcl: 'authenticatedRead' })

Also with built-in public (predefinedAcl: publicRead) and private (predefinedAcl: private) options:

bucket.upload(filepath, { public: true }, function(err, file) {})

var writeStream = file.createWriteStream({ private: true })

@stephenplusplus stephenplusplus added the api: storage Issues related to the Cloud Storage API. label May 2, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 2, 2016
@asciimike
Copy link

Thanks for this--I like the quick public private ones as well :)

@coveralls
Copy link

coveralls commented May 2, 2016

Coverage Status

Coverage remained the same at 100.0% when pulling e852ffd on stephenplusplus:spp--1178 into 7c71ec5 on GoogleCloudPlatform:master.

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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants