@textile/hub > Buckets > setDefaultArchiveConfig
Buckets.setDefaultArchiveConfig() method
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
(Experimental) Set the default ArchiveConfig for the specified Bucket.
Signature:
setDefaultArchiveConfig(key: string, config: ArchiveConfig): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
key | string | Unique (IPNS compatible) identifier key for a bucket. |
config | ArchiveConfig | The ArchiveConfig to set as the new default. |
Returns:
Promise<void>
Example
Set the default ArchiveConfig
import { Buckets, ArchiveConfig } from '@textile/hub'
async function setDefaultConfig (buckets: Buckets, key: string, config: ArchiveConfig) {
await buckets.setDefaultArchiveConfig(key, config)
}