You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varmetadata={contentType: 'text/plain',// <- This worksmetadata: {customValue: 'MyValue'// <- This will not be set with gcloud 0.12}};inStream.pipe(file.createWriteStream(metadata));
So, createWriteStream takes an options object. That object can hold a metadata object with file metadata, such as contentType. Inside of that, you can have another metadata object to hold custom values. It's a bit of a mind warp.
Sorry for my late response, I had this on my list but was unable to test it until now. I have now both upgraded to 1.13.2 and added the additional nesting in the options object, works as expected. Thanks for the fast reply and support.
Activity
stephenplusplus commentedon Mar 3, 2015
Would you mind trying against master? I believe we realized this recently and it should be fixed for our next release.
ryanseys commentedon Apr 1, 2015
Try the newest release! We just released v0.13.1 today.
stephenplusplus commentedon Apr 6, 2015
This will work:
So, createWriteStream takes an options object. That object can hold a metadata object with file metadata, such as contentType. Inside of that, you can have another metadata object to hold custom values. It's a bit of a mind warp.
phw commentedon Apr 9, 2015
Sorry for my late response, I had this on my list but was unable to test it until now. I have now both upgraded to 1.13.2 and added the additional nesting in the options object, works as expected. Thanks for the fast reply and support.
fix: do not modify options object, use defaultScopes (#419)
chore: add dev dependencies for cloud-rad ref docs (#419)
chore: remove duplicate mocha config (#419)
chore: generate GAPIC metadata JSON file (#419)
chore: generate GAPIC metadata JSON file (#419)
19 remaining items
chore: don't install gcp-releasetool in publish script (#419)
chore: don't install gcp-releasetool in publish script (#419)
chore(deps): update dependency gts to v1 (#419)
build: remove verbose logging from test scripts (#419)
build: remove verbose logging from test scripts (#419)
chore(deps): update dependency eslint-plugin-prettier to v3 (#419)
fix(deps): update dependency @google-cloud/paginator to ^0.2.0 (#419)
chore: migrate code from googleapis/gcp-metadata (#53)
build: allow Node 10 on presubmit to push to codecov (#419)
chore(deps): update dependency eslint-plugin-prettier to v3 (googleap…
build: use linkinator for docs test (#419)
build: use linkinator for docs test (#419)
docs(samples): correct publish retry settings (#419)
build: use linkinator for docs test (#419)
build: use linkinator for docs test (googleapis#419)