Hierarchy
-
StorageReader↳BijectionStorageReader↳↳BijectionStorageWriter
Methods
inspectProtectedFile
▸ inspectProtectedFile(storageId): Promise<ProtectedFileBinding>
Inspect a protected file’s logical lifecycle in this transaction. The
native row and current source permissions are read dependencies, so an
erasure racing this transaction refuses its result or commit. Missing,
ordinary, erased, and unauthorized files do not disclose metadata.
This does not verify that physical blob bytes still exist.
Parameters
Returns
Promise<ProtectedFileBinding>
getUrl
▸ getUrl(storageId): Promise<null | string>
Get the URL for a file in storage by its Id<"_storage">.
The GET response includes a standard HTTP Digest header with a sha256 checksum.
Example
Parameters
Returns
Promise<null | string>
- A URL which fetches the file via an HTTP GET, or
nullif the file no longer exists.
Inherited from
StorageReader.getUrl ▸ getUrl<T>(storageId): Promise<null | string>
Deprecated
Passing a string is deprecated, use storage.getUrl(Id<"_storage">) instead.
Get the URL for a file in storage by its StorageId.
The GET response includes a standard HTTP Digest header with a sha256 checksum.
Type parameters
Parameters
Returns
Promise<null | string>
- A url which fetches the file via an HTTP GET, or
nullif it no longer exists.
Inherited from
StorageReader.getUrlgetMetadata
▸ getMetadata(storageId): Promise<null | FileMetadata>
Deprecated
Use ctx.db.system.get("_storage", storageId) instead, which returns
equivalent metadata from the _storage system table (with a slightly different shape):
Parameters
Returns
Promise<null | FileMetadata>
- A FileMetadata object if found or
nullif not found.
Inherited from
StorageReader.getMetadata ▸ getMetadata<T>(storageId): Promise<null | FileMetadata>
Deprecated
Use ctx.db.system.get("_storage", storageId) instead.
Get metadata for a file.
Type parameters
Parameters
Returns
Promise<null | FileMetadata>
- A FileMetadata object if found or
nullif not found.