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 — Bucket.upload: charset not appended on application/javascript contentType · Issue #320 · googleapis/google-cloud-node

Bucket.upload: charset not appended on application/javascript contentType #320

New issue
Copy link
New issue
Copy link
Closed
Closed
Bucket.upload: charset not appended on application/javascript contentType#320
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.
Milestone
Storage Stable

Description

@beeant
beeant
opened on Dec 4, 2014
Issue body actions

I did console.log(metadata) on Bucket.upload API. and charset=utf-8 doesn't seem to be appended for application/javascript.

https://github.com/GoogleCloudPlatform/gcloud-node/blob/d36802f03267a4c890a2f5203a8a46a452b329cf/lib/storage/bucket.js#L418

How about using https://github.com/jshttp/mime-types instead of https://github.com/broofa/node-mime?

node-mime doesn't seem to return any charset on application/javascript, but mime-types does.

Activity

Next
  1. stephenplusplus commented on Dec 4, 2014

    @stephenplusplus
    stephenplusplus
    on Dec 4, 2014
    Contributor
    More actions

    mime-types looks good to me. 👍

  2. stephenplusplus
    added
    status: blockedResolving the issue is dependent on other work.
    on Dec 4, 2014
  3. stephenplusplus commented on Dec 4, 2014

    @stephenplusplus
    stephenplusplus
    on Dec 4, 2014
    Contributor
    More actions

    I'll wait a little bit to see how jshttp/mime-types#15 shakes out. In the meantime, you are free to use mime-types in your app, then set its value on the metadata object passed to .upload:

    bucket.upload("file.js", { contentType: "result from mimetypes" }, function (err, file) {})
  4. beeant commented on Dec 4, 2014

    @beeant
    beeant
    on Dec 4, 2014
    Author
    More actions

    Thank you for your reply.
    Thank you for the suggestion too, and yes, that's what I'm doing right now.
    I'll be keeping track for the update and remove the unnecessary parts of mime-types codes in my app after the update.

  5. stephenplusplus
    added a commit that references this issue on Dec 5, 2014

    switch to mime-types. fixes googleapis#320

    This issue will close once commit 3484e3b is merged into the 'master' branch.
    3484e3b
  6. stephenplusplus
    removed
    status: blockedResolving the issue is dependent on other work.
    on Dec 5, 2014
  7. stephenplusplus
    closed this as completedin 3484e3bon Dec 8, 2014
  8. ryanseys
    added a commit that references this issue on Dec 8, 2014

    Merge pull request #322 from stephenplusplus/spp--mime-lib-switch

    This issue will close once commit dc4bf20 is merged into the 'main' branch.
    dc4bf20
  9. stephenplusplus
    added 2 commits that reference this issue on Dec 8, 2014

    switch to mime-types. fixes googleapis#320

    This issue will close once commit 24f165e is merged into the 'master' branch.
    24f165e

    switch to mime-types. fixes googleapis#320

    This issue will close once commit b5211a7 is merged into the 'master' branch.
    b5211a7
  10. jgeewax
    added
    api: storageIssues related to the Cloud Storage API.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Feb 2, 2015
  11. jgeewax
    added this to the Storage Stable milestone on Feb 2, 2015
  12. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 6, 2020
  13. 41 remaining items

  14. sofisl
    added a commit that references this issue on Jan 27, 2026

    Revert "chore: remove redirect of nvm install in e2e test to make fai…

    314e21e
  15. GautamSharda
    added 2 commits that reference this issue on Feb 2, 2026

    build: add new kokoro config for coverage and release-please (#320)

    26e2cd6

    build: add new kokoro config for coverage and release-please (#320)

    4c7c52b
  16. sofisl
    added a commit that references this issue on Feb 4, 2026

    chore: release 1.0.0 (#320)

    1b274fa
  17. sofisl
    added 3 commits that reference this issue on Feb 24, 2026

    Reject FieldTransforms from FieldTransforms (#320)

    181c285

    Support Bucket/Object lock operations (#320)

    f531652

    Revert "Support Bucket/Object lock operations (#320)" (#373)

    441e5a3
  18. GautamSharda
    added a commit that references this issue on Feb 25, 2026

    chore: update import paths for Go targets to match open source locati…

    13729e1
  19. sofisl
    added a commit that references this issue on Feb 26, 2026

    fix: upgrade to the latest common-grpc (#320)

    abc5797
  20. GautamSharda
    added a commit that references this issue on Mar 5, 2026

    chore: update eslintignore config (#320)

    899346f
  21. codyoss
    added 2 commits that reference this issue on Mar 9, 2026

    build: add srs yaml file (#320)

    5e82370

    build: add srs yaml file (#320)

    e6b66b3
  22. GautamSharda
    added a commit that references this issue on Mar 11, 2026

    fix(deps): update dependency through2 to v3 (#320)

    fcc38bc
  23. thiyaguk09
    added 2 commits that reference this issue on Mar 18, 2026

    Support Bucket/Object lock operations (googleapis#320)

    e402d19

    Revert "Support Bucket/Object lock operations (googleapis#320)" (goog…

    2256ce7
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

    • 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.