Skip to content

Storage SDK missing methods to reference multiple buckets #4407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
samtstern opened this issue Feb 3, 2021 · 1 comment · Fixed by #4410
Closed

Storage SDK missing methods to reference multiple buckets #4407

samtstern opened this issue Feb 3, 2021 · 1 comment · Fixed by #4410
Assignees

Comments

@samtstern
Copy link
Contributor

[REQUIRED] Describe your environment

  • Operating System version: macOS
  • Browser version: N/A
  • Firebase SDK version: exp
  • Firebase Product: storage

[REQUIRED] Describe the problem

Originally reported here:
#4402

Steps to reproduce:

Relevant Code:

There seems to be no way to reproduce either of these snippets in the new modular SDK:

const storage = firebase.app().storage("gs://my-custom-bucket");
  const customApp = firebase.initializeApp({
    // ... custom stuff
  });

  // Get the default bucket from a custom firebase.app.App
  const storage = customApp.storage();

  // Get a non-default bucket from a custom firebase.app.App
  const storage = customApp.storage("gs://my-custom-bucket");
@hsubox76
Copy link
Contributor

hsubox76 commented Feb 3, 2021

You can do:

const storage = getStorage(app, "gs://my-custom-bucket")

The second param is named url in the definition so I guess it should probably be named "bucket," and it doesn't have an accompanying jsdoc description so that should be added. Is that enough or am I missing anything else that would be needed?

@firebase firebase locked and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants