Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Request for url-like prop/method on files uploaded to storage #931

@galki

Description

@galki

Is your feature request related to a problem? Please describe.
I'd like to get the URL of an image upon saving it to Storage, so I can save it in Firestore right away and display the image later. Right now there is getSignedUrl() and metadata.mediaLink (for downloading) but apparently we can view images with the following URLs:

Public files

https://storage.googleapis.com/[BUCKET_NAME]/[IMAGE_PATH]

Files viewable with access key

https://firebasestorage.googleapis.com/v0/b/[BUCKET_NAME]/o/[IMAGE_PATH]?alt=media&token=[ACCESS_TOKEN]

But there is no property or method that returns these URLs. It seems like people are just stitching them together in the understanding that this is a hack that might break in the future if the actual URL format happens to change.

Describe the solution you'd like
I'd like a property or method to exist on a bucket file instance that would return either of the above mentioned URLs depending on whether the file is public or not, or whether an access token exists in the metadata.

Describe alternatives you've considered
Stitching the URL together by myself.

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/nodejs-storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions