StorageSource
@firecms/core / StorageSource
Interface: StorageSource
Section titled “Interface: StorageSource”Defined in: types/storage.ts:74
Properties
Section titled “Properties”deleteFile()
Section titled “deleteFile()”deleteFile: (
path,bucket?) =>Promise<void>
Defined in: types/storage.ts:111
Delete a file.
Parameters
Section titled “Parameters”string
bucket?
Section titled “bucket?”string
Returns
Section titled “Returns”Promise<void>
getDownloadURL()
Section titled “getDownloadURL()”getDownloadURL: (
pathOrUrl,bucket?) =>Promise<DownloadConfig>
Defined in: types/storage.ts:96
Convert a storage path or URL into a download configuration
Parameters
Section titled “Parameters”pathOrUrl
Section titled “pathOrUrl”string
bucket?
Section titled “bucket?”string
Returns
Section titled “Returns”Promise<DownloadConfig>
getFile()
Section titled “getFile()”getFile: (
path,bucket?) =>Promise<File|null>
Defined in: types/storage.ts:104
Get a file from a storage path. It returns null if the file does not exist.
Parameters
Section titled “Parameters”string
bucket?
Section titled “bucket?”string
Returns
Section titled “Returns”Promise<File | null>
list()
Section titled “list()”list: (
path,options?) =>Promise<StorageListResult>
Defined in: types/storage.ts:118
List the contents of a path.
Parameters
Section titled “Parameters”string
options?
Section titled “options?”bucket?
Section titled “bucket?”string
maxResults?
Section titled “maxResults?”number
pageToken?
Section titled “pageToken?”string
Returns
Section titled “Returns”Promise<StorageListResult>
uploadFile()
Section titled “uploadFile()”uploadFile: (
file) =>Promise<UploadFileResult>
Defined in: types/storage.ts:83
Upload a file, specifying a name and a path
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<UploadFileResult>