Classes & Interfaces
StorageSettings
Properties
Properties
| Name | Type | Description |
|---|---|---|
expiresIn | ObjectExpiration | The expiration time for the stored files (images, videos, etc.). You can specify one of the enumerated values or a number of seconds. |
StorageClient
Properties
Properties
| Name | Type | Description |
|---|---|---|
upload | (file: Blob, options?: UploadOptions) => Promise<string> | Upload a file to the server. Returns the URL of the uploaded file. |
transformInput | (input: Record<string, any>) => Promise<Record<string, any>> | Transform the input to replace file objects with URLs. This is used to transform the input before sending it to the server and ensures that the server receives URLs instead of file objects. |
Functions
getExpirationDurationSeconds
StorageSettings to the expiration duration in seconds.
| Parameter | Type | Description |
|---|---|---|
lifecycle | StorageSettings | the lifecycle preference |
number | undefined
buildObjectLifecycleHeaders
| Parameter | Type | Description |
|---|---|---|
lifecycle | StorageSettings | undefined | the lifecycle preference |
Record<string, string>
createStorageClient
| Parameter | Type | Description |
|---|---|---|
{ config, } | StorageClientDependencies | - |
StorageClient