前往主控台

The Firebase Storage service interface.

Do not call this constructor directly. Instead, use firebase.storage().

See Get Started on Web for a full guide on how to use the Firebase Storage service.

Index

Properties

app

app: App

The app associated with the Storage service instance.

example
var app = storage.app;

maxOperationRetryTime

maxOperationRetryTime: number

The maximum time to retry operations other than uploads or downloads in milliseconds.

maxUploadRetryTime

maxUploadRetryTime: number

The maximum time to retry uploads in milliseconds.

Methods

ref

  • ref(path?: string): Reference
  • Returns a reference for the given path in the default bucket.

    Parameters

    • Optional path: string

      A relative path to initialize the reference with, for example path/to/image.jpg. If not passed, the returned reference points to the bucket root.

    Returns Reference

    A reference for the given path.

refFromURL

  • refFromURL(url: string): Reference
  • Returns a reference for the given absolute URL.

    Parameters

    • url: string

      A URL in the form:
      1) a gs:// URL, for example gs://bucket/files/image.png
      2) a download URL taken from object metadata.
      @see {@link firebase.storage.FullMetadata.prototype.downloadURLs}

    Returns Reference

    A reference for the given URL.

setMaxOperationRetryTime

  • setMaxOperationRetryTime(time: number): any
  • see

    {@link firebase.storage.Storage.prototype.maxOperationRetryTime}

    Parameters

    • time: number

      The new maximum operation retry time in milliseconds.

    Returns any

setMaxUploadRetryTime

  • setMaxUploadRetryTime(time: number): any
  • see

    {@link firebase.storage.Storage.prototype.maxUploadRetryTime}

    Parameters

    • time: number

      The new maximum upload retry time in milliseconds.

    Returns any