Stone.js API
    Preparing search index...

    S3 (and S3-compatible) storage driver.

    Implements the agnostic FileSystem contract plus SignedUrlCapable against Amazon S3 and any S3-compatible store (Cloudflare R2, MinIO, DigitalOcean Spaces, Alibaba OSS, Tencent COS) via a custom endpoint. The AWS SDK is imported lazily and is an optional peer dependency, so this module carries no cloud SDK weight until an S3 disk is actually used.

    Implements

    • FileSystem
    • SignedUrlCapable
    Index
    name: string

    A human-readable disk name (e.g. 'local', 's3'), used by the StorageManager.

    • Parameters

      • source: string
      • destination: string

      Returns Promise<void>

    • Parameters

      • path: string

      Returns Promise<boolean>

    • Parameters

      • path: string

      Returns Promise<boolean>

    • Parameters

      • directory: string = ''
      • recursive: boolean = true

      Returns Promise<string[]>

    • Parameters

      • path: string

      Returns Promise<Buffer<ArrayBufferLike>>

    • Parameters

      • path: string
      • encoding: BufferEncoding = 'utf-8'

      Returns Promise<string>

    • Parameters

      • path: string

      Returns Promise<number>

    • No-op for object stores: prefixes are implicit and created on write. Present to satisfy the FileSystem contract.

      Parameters

      • _path: string

      Returns Promise<void>

    • Parameters

      • path: string

      Returns Promise<string>

    • Parameters

      • source: string
      • destination: string

      Returns Promise<void>

    • Parameters

      • path: string
      • content: string | Buffer<ArrayBufferLike>

      Returns Promise<void>

    • Parameters

      • path: string

      Returns Promise<Readable>

    • Parameters

      • path: string

      Returns Promise<number>

    • Parameters

      • path: string

      Returns Promise<StorageStat>

    • Mint a short-lived signed target to upload to path (direct-to-storage PUT).

      Parameters

      • path: string

        The destination object path.

      • options: TemporaryUploadUrlOptions = {}

        Expiry and the content type to bind into the signature.

      Returns Promise<SignedUpload>

      The signed upload target.

    • Mint a short-lived signed URL to download path.

      Parameters

      • path: string

        The object path.

      • options: TemporaryUrlOptions = {}

        Expiry and response-header overrides.

      Returns Promise<string>

      The signed download URL.

    • Parameters

      • path: string

      Returns Promise<string>

    • Parameters

      • path: string
      • stream: Readable

      Returns Promise<void>