Skip to content

Set initial metadata file on first upload #363

Closed
@temka1234

Description

In my project i want to create an empty file in google storage with metadata in one step.
I found this note in gcloud-node/lib/storage/file.js:

...
 * @param {object=} metadata - Metadata to set on the object. This is useful
 *     when you are creating a file for the first time, to prevent making an
 *     extra call to `setMetadata`.
...
function File(bucket, name, metadata) { }

But i cant find any code that use file.metadata parameter in createWriteStream or getWritableStream_.
Also storage.bucket.file(name) method that created new instance of File not contains metadata parameter.

I know, that i can use createWriteStream(metadata). This is the only way?

Metadata

Assignees

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions