StorageReference interface

表示对 Google Cloud Storage 对象的引用。开发人员可以上传、下载和删除对象,以及获取/设置对象元数据。

签名:

export interface StorageReference 

特性

财产类型描述
细绳包含此引用的对象的存储桶的名称。
完整路径细绳该对象的完整路径。
姓名细绳该对象的短名称,它是完整路径的最后一个组成部分。例如,如果 fullPath 为“full/path/image.png”,则名称为“image.png”。
家长存储参考|无效的指向此引用的父位置的引用,如果此引用是根,则为 null。
存储参考对此对象存储桶的根的引用。
贮存Firebase存储与此引用关联的FirebaseStorage实例。

方法

方法描述
toString()返回此对象的 gs:// URL,格式为gs://<bucket>/<path>/<to>/<object>

StorageReference.bucket

包含此引用的对象的存储桶的名称。

签名:

bucket: string;

StorageReference.fullPath

该对象的完整路径。

签名:

fullPath: string;

StorageReference.name

该对象的短名称,它是完整路径的最后一个组成部分。例如,如果 fullPath 为“full/path/image.png”,则名称为“image.png”。

签名:

name: string;

StorageReference.parent

指向此引用的父位置的引用,如果此引用是根,则为 null。

签名:

parent: StorageReference | null;

存储参考.root

对此对象存储桶的根的引用。

签名:

root: StorageReference;

StorageReference.storage

与此引用关联的FirebaseStorage实例。

签名:

storage: FirebaseStorage;

StorageReference.toString()

返回此对象的 gs:// URL,格式为gs://<bucket>/<path>/<to>/<object>

签名:

toString(): string;

返回:

细绳

gs:// URL。