Type Alias MediaManagerOptions

MediaManagerOptions: {
    bucketName: string;
    credentialsJSON?: string;
    getVariantSettings?: GetVariantSettingsFn;
    prefix?: string;
}

Type declaration

  • bucketName: string

    Existing GCS bucket. The service account of credentialsJSON needs to have the following permission of this bucket:

    • storage.objects.list
    • storage.objects.create
    • storage.objects.get
    • storage.objects.delete
  • OptionalcredentialsJSON?: string

    Google cloud credential JSON content of a service account. Must include keys:

    • project_id
    • private_key
    • client_email

    If not given, Application Default Credential will be used.

  • OptionalgetVariantSettings?: GetVariantSettingsFn

    Specify the variant settings for each media file being uploaded. If not given, only 1 variant, original, will be provided for all file types.

  • Optionalprefix?: string

    The prefix to write media files. File structure after this prefix is managed by MediaManager