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 — upload or download file error · Issue #1389 · googleapis/google-cloud-node

upload or download file error #1389

New issue
Copy link
New issue
Copy link
Closed
Closed
upload or download file error#1389
Copy link
Assignees
stephenplusplus
Labels
api: storageIssues related to the Cloud Storage API.

Description

@uqutub
uqutub
opened on Jun 22, 2016
Issue body actions
// download file function...
var bucket = gcs.bucket('xxx.appspot.com');
bucket.file('avatar_2_99737.jpg').download({
   destination: '/testAbc/avatar_2_99737.jpg'
}, function(err) {
   console.log(err)
});

Whenever i try to upload or download file i got this error.

../GoogleCloudStorage/node_modules/mime/mime.js:70
  var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
                        ^

_TypeError: path.replace is not a function_

Activity

  1. stephenplusplus commented on Jun 22, 2016

    @stephenplusplus
    stephenplusplus
    on Jun 22, 2016
    Contributor
    More actions

    I haven't been able to reproduce. Also, we don't use the module mime. Could this be coming from a line of code that wasn't in your example? If not, a simple reproducible sample repo would be great to help debug.

  2. stephenplusplus
    added
    api: storageIssues related to the Cloud Storage API.
    on Jun 22, 2016
  3. stephenplusplus commented on Jun 27, 2016

    @stephenplusplus
    stephenplusplus
    on Jun 27, 2016
    Contributor
    More actions

    I'm going to close, but if you can share a small repo that I can clone to reproduce the bug, I'll re-open.

  4. stephenplusplus
    closed this as completedon Jun 27, 2016
  5. stephenplusplus commented on Jul 22, 2016

    @stephenplusplus
    stephenplusplus
    on Jul 22, 2016
    Contributor
    More actions

    Another issue (#1445) popped up with this same error. We traced it back to an argument type mismatch. gcloud takes an object with either a keyFilename string or a credentials object. In #1445, an object was provided, but under the name keyFilename. String functions were trying to be called on that object, which is what threw the error. Naming it credentials instead solved the problem.

  6. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  7. miguelvelezsa
    added 2 commits that reference this issue on Jul 23, 2025

    fix(deps): update dependency @grpc/grpc-js to ~1.8.0 (#1389)

    7d8193f

    chore(main): release 3.5.5 (#1416)

    aa46733
  8. miguelvelezsa
    added a commit that references this issue on Jan 28, 2026

    fix: More error visibility in nodejs-datastore (#1389)

    98d8227
  9. sofisl
    added 2 commits that reference this issue on Feb 3, 2026

    chore(deps): update actions/setup-node action (#1389)

    ad0a484

    fix: More error visibility in nodejs-datastore (#1389)

    2136107
  10. sofisl
    added a commit that references this issue on Feb 17, 2026

    fix: More error visibility in nodejs-datastore (#1389)

    5fc3e27
  11. sofisl
    added 2 commits that reference this issue on Feb 25, 2026

    chore: release 5.7.3 (#1389)

    b843d11

    chore: release 5.8.1 (#1389)

    e195312
  12. thiyaguk09
    added a commit that references this issue on Mar 18, 2026

    chore: release 5.7.3 (googleapis#1389)

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

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

api: storageIssues related to the Cloud Storage API.

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.