GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Custom metadata broken in 0.12.0 · Issue #419 · googleapis/google-cloud-node

Custom metadata broken in 0.12.0 #419

New issue
Copy link
New issue
Copy link
Closed
Closed
Custom metadata broken in 0.12.0#419
Copy link
Assignees
stephenplusplus
Labels
🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@phw
phw
opened on Mar 2, 2015
Issue body actions

Providing custom metadata via the metadata.metadata property as documented at https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.10.0/storage/file?method=setMetadata is not working for me with gcloud 0.12, but works fine with 0.11. Standard metadata works fine, too.

Partial sample code:

var metadata = {
  contentType: 'text/plain', // <- This works
  metadata: {
    customValue: 'MyValue' // <- This will not be set with gcloud 0.12
  }
};

inStream.pipe(file.createWriteStream(metadata));

Activity

Next
  1. stephenplusplus commented on Mar 3, 2015

    @stephenplusplus
    stephenplusplus
    on Mar 3, 2015
    Contributor
    More actions

    Would you mind trying against master? I believe we realized this recently and it should be fixed for our next release.

  2. ryanseys commented on Apr 1, 2015

    @ryanseys
    ryanseys
    on Apr 1, 2015
    Contributor
    More actions

    Try the newest release! We just released v0.13.1 today.

  3. stephenplusplus
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: storageIssues related to the Cloud Storage API.
    on Apr 6, 2015
  4. stephenplusplus commented on Apr 6, 2015

    @stephenplusplus
    stephenplusplus
    on Apr 6, 2015
    Contributor
    More actions

    This will work:

    var options = {
      metadata: {
        contentType: 'text/plain',
        metadata: {
          customValue: 'MyValue'
        }
      }
    };
    
    inStream.pipe(file.createWriteStream(options));

    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.

  5. stephenplusplus
    closed this as completedon Apr 6, 2015
  6. phw commented on Apr 9, 2015

    @phw
    phw
    on Apr 9, 2015
    ContributorAuthor
    More actions

    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.

  7. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 6, 2020
  8. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  9. chingor13
    added a commit that references this issue on Aug 22, 2022

    fix: do not modify options object, use defaultScopes (#419)

    c29e4c8
  10. sofisl
    added a commit that references this issue on Sep 15, 2022

    chore: add dev dependencies for cloud-rad ref docs (#419)

    204cf18
  11. sofisl
    added a commit that references this issue on Sep 27, 2022

    chore: remove duplicate mocha config (#419)

    618e7d7
  12. sofisl
    added 2 commits that reference this issue on Oct 12, 2022

    chore: generate GAPIC metadata JSON file (#419)

    03de954

    chore: generate GAPIC metadata JSON file (#419)

    7682772
  13. 19 remaining items

  14. sofisl
    added 4 commits that reference this issue on Jan 27, 2026

    chore: don't install gcp-releasetool in publish script (#419)

    2f222e3

    chore: don't install gcp-releasetool in publish script (#419)

    ccf8aa5

    chore(deps): update dependency gts to v1 (#419)

    c917d83

    build: remove verbose logging from test scripts (#419)

    8b7f4ea
  15. sofisl
    added a commit that references this issue on Feb 17, 2026

    build: remove verbose logging from test scripts (#419)

    456a5f8
  16. sofisl
    added a commit that references this issue on Feb 25, 2026

    chore(deps): update dependency eslint-plugin-prettier to v3 (#419)

    ba8aae7
  17. GautamSharda
    added a commit that references this issue on Mar 5, 2026

    fix(deps): update dependency @google-cloud/paginator to ^0.2.0 (#419)

    b893592
  18. sofisl
    added a commit that references this issue on Mar 5, 2026

    chore: migrate code from googleapis/gcp-metadata (#53)

    fa9a454
  19. GautamSharda
    added a commit that references this issue on Mar 12, 2026

    build: allow Node 10 on presubmit to push to codecov (#419)

    d254657
  20. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    chore(deps): update dependency eslint-plugin-prettier to v3 (googleap…

    7ba5f70
  21. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    build: use linkinator for docs test (#419)

    a1acb6f

    build: use linkinator for docs test (#419)

    1f88032
  22. feywind
    added a commit that references this issue on Mar 27, 2026

    docs(samples): correct publish retry settings (#419)

    9f875ac
  23. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    build: use linkinator for docs test (#419)

    7b162c3
  24. thiyaguk09
    added a commit that references this issue on May 5, 2026

    build: use linkinator for docs test (googleapis#419)

    ae21af4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.