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 — Unable to set svg Content-Type · Issue #129 · googleapis/google-cloud-node

Unable to set svg Content-Type #129

New issue
Copy link
New issue
Copy link
Closed
Closed
Unable to set svg Content-Type#129
Copy link
Assignees
silvolu
Labels
🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.
Milestone
Storage Stable

Description

@samdaltonmaag
samdaltonmaag
opened on Aug 22, 2014
Issue body actions

Hi,

SVGs that I upload to my bucket are being served as text/plain. I suspect that the mime type detection has failed, so I'm trying to set it manually. Here's an example metadata object I use during upload:

      metadata: {
        'Content-Type': 'image/svg+xml'
      }

There doesn't seem to be any documentation on how to set the content type, so any help is appreciated.

Cheers

Activity

Next
  1. stephenplusplus commented on Aug 22, 2014

    @stephenplusplus
    stephenplusplus
    on Aug 22, 2014
    Contributor
    More actions

    Just to confirm we're looking at the same thing, what version of gcloud-node are you running?

  2. silvolu commented on Aug 22, 2014

    @silvolu
    silvolu
    on Aug 22, 2014
    Contributor
    More actions

    @samdaltonmaag there is an example in the storage regression test, the key should be contentType. You can find a complete description of Cloud Storage objects here.

  3. stephenplusplus commented on Aug 22, 2014

    @stephenplusplus
    stephenplusplus
    on Aug 22, 2014
    Contributor
    More actions

    Small thing: it's actually contentType, not ContentType.

    The bucket write functionality has changed since 0.3.0, so keep that in mind when looking at the repo's tests & docs.

    @silvolu Can we put out a 0.4.0 before the weekend?

  4. samdaltonmaag commented on Aug 22, 2014

    @samdaltonmaag
    samdaltonmaag
    on Aug 22, 2014
    Author
    More actions

    Ah yes, it's working with that property name. I'm using 0.3.0.
    Appreciate the help.

  5. silvolu commented on Aug 22, 2014

    @silvolu
    silvolu
    on Aug 22, 2014
    Contributor
    More actions

    @stephenplusplus yeah, but the way you write metadata hasn't changed ;-)

  6. silvolu
    closed this as completedon Aug 22, 2014
  7. jgeewax
    added
    api: datastoreIssues related to the Datastore API.
    api: storageIssues related to the Cloud Storage API.
    and removed
    api: datastoreIssues related to the Datastore API.
    on Feb 2, 2015
  8. jgeewax
    added this to the Storage Stable milestone on Feb 2, 2015
  9. adamreisnz commented on Jun 8, 2016

    @adamreisnz
    adamreisnz
    on Jun 8, 2016
    More actions

    Could this be documented a bit clearer please? I reached this issue because I also couldn't find in the docs how to properly write the Content-Type meta data property, and tried to write it as:

    let stream = gcsFile.createWriteStream({
          metaData: {
            'Content-Type': file.mimetype
          }
        });

    Would be nice if this was documented, or a link to relevant documentation provided, somewhere here:

    https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.35.0/storage/file?method=createWriteStream

  10. stephenplusplus commented on Jun 8, 2016

    @stephenplusplus
    stephenplusplus
    on Jun 8, 2016
    Contributor
    More actions

    We do show setting metadata in an example. Doesn't say much that you didn't see it, though! Could you contribute a PR with what you would have found helpful?

  11. adamreisnz commented on Jun 8, 2016

    @adamreisnz
    adamreisnz
    on Jun 8, 2016
    More actions

    If you can send me the link to the page where the meta data is shown in an example, then yes I could add a link to that page in the documentation.

  12. stephenplusplus commented on Jun 8, 2016

    @stephenplusplus
    stephenplusplus
    on Jun 8, 2016
    Contributor
    More actions

    It's in the example for createWriteStream under "Uploading a File with Metadata"

  13. adamreisnz commented on Jun 8, 2016

    @adamreisnz
    adamreisnz
    on Jun 8, 2016
    More actions

    Ah, there it is. Yes, a link in the table at the metadata property to that example would be great. I'd create a PR for this, but not sure what repository/files I should be looking at.

  14. 56 remaining items

  15. sofisl
    added 3 commits that reference this issue on Feb 25, 2026

    File#getSignedUrl: Support resumable action. (#129)

    e94fee6

    chore: removing node7 job from CircleCI (#129)

    361d876

    Merge pull request #129 from googleapis/fix-yaml

    d3e9cc2
  16. codyoss
    added 3 commits that reference this issue on Mar 9, 2026

    fix(docs): move to new client docs URL (#129)

    ed668cf

    fix(docs): move to new client docs URL (#129)

    67e017d

    build: rename _toc to toc (#129)

    481b972
  17. GautamSharda
    added 3 commits that reference this issue on Mar 12, 2026

    chore: release 1.0.2 (#129)

    a798a0e

    chore: release 1.0.2 (#129)

    a2466a1

    chore: release 0.18.4 (#129)

    a5e3251
  18. sofisl
    added a commit that references this issue on Mar 17, 2026

    fix: Fix enum serialization in maps and repeated fields (#129)

    4385cb8
  19. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    File#getSignedUrl: Support resumable action. (googleapis#129)

    709688d
  20. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    Handle buffers as literal atoms when used as a Filter. (#129)

    c01ee30

    Handle buffers as literal atoms when used as a Filter. (#129)

    dd8333a
  21. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    Handle buffers as literal atoms when used as a Filter. (#129)

    adc0a28
  22. thiyaguk09
    added a commit that references this issue on May 5, 2026

    Handle buffers as literal atoms when used as a Filter. (googleapis#129)

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

Metadata

Metadata

Assignees

  • @silvolu
    silvolu

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

    Milestone

    • Storage Stable

    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.