Skip to content

options.public to storage/File.createWriteStream doesn't make uploaded files public #1566

@aknuds1

Description

@aknuds1

According to API docs, storage/File.createWriteStream should take a boolean option public that makes the uploaded file publicly readable. However, in my experience this isn't the case.

I create the stream like this:

let cloudFileStream = cloudFile.createWriteStream({
  public: true,
  resumable: false,
})

And still, I have to call cloudFile.makePublic after the upload has finished, because otherwise the file is only accessible to the owner:

cloudFileStream
  .on('finish', () => {
    cloudFile.makePublic()
  })

Environment details

  • OS: OS X El Capitan
  • Node.js version: 6.4.0
  • npm version: 3.10.6
  • google-cloud-node version: 0.39.0

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions