Type Alias S3FileStorageAdapterSettings

S3FileStorageAdapterSettings: {
    bucket: string;
    cdnUrl?: string | null;
    client: S3Client;
    enableAccurateGetPublicUrl?: boolean;
    enableAccurateGetSignedDownloadUrl?: boolean;
    enableAccuratePut?: boolean;
    enableAccurateRemoveMany?: boolean;
    publicUrlGenerator?: S3FilePublicUrlGenerator;
    serverSideEncryption?: ServerSideEncryption | null;
}

IMPORT_PATH: "@daiso-tech/core/file-storage/aws-file-storage-adapter"

Type declaration

  • bucket: string

    The bucket option defines the S3 bucket to use for managing files.

  • OptionalcdnUrl?: string | null

    The cdnUrl field can be used to define the base URL for generating public URL for a file. For example, If you use CloudFront alongside S3 to serve public files, the cdnUrl property should be the CloudFront URL.

    null
    
  • client: S3Client
  • OptionalenableAccurateGetPublicUrl?: boolean

    If false the getPublicUrl method of ISignedFileStorageAdapter will perfom one database call and therby always return string even when the file doesnt exists. Note the fewer database calls the cheaper it will be when using aws s3.

    true
    
  • OptionalenableAccurateGetSignedDownloadUrl?: boolean

    If false the getSignedDownloadUrl method of ISignedFileStorageAdapter will perfom one database call and therby always return string even when the file doesnt exists. Note the fewer database calls the cheaper it will be when using aws s3.

    true
    
  • OptionalenableAccuratePut?: boolean

    If false the put method of ISignedFileStorageAdapter will perform one database call and thereby always return true even when the file doesnt exists. Note the fewer database calls the cheaper it will be when using aws s3.

    true
    
  • OptionalenableAccurateRemoveMany?: boolean
    true
    
  • OptionalpublicUrlGenerator?: S3FilePublicUrlGenerator

    Define a custom public url generator for creating public and signed URLs.

    import { defaultPublicUrlGenerator } from "@daiso-tech/core/file-storage/s3-file-storage-adapter"
    defaultPublicUrlGenerator
  • OptionalserverSideEncryption?: ServerSideEncryption | null

    Define ServerSideEncryption option for all objects uploaded to S3. It can be disabled by passing null

    null