lean-s3
    Preparing search index...

    Interface S3FilePresignOptions

    interface S3FilePresignOptions {
        acl?: Acl;
        bucket?: string;
        contentHash?: Buffer<ArrayBufferLike>;
        contentLength?: number;
        endpoint?: string;
        expiresIn?: number;
        method?: PresignableHttpMethod;
        region?: string;
        response?: { contentDisposition?: ContentDisposition };
        storageClass?: StorageClass;
        type?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    acl?: Acl
    bucket?: string

    The name of the bucket to operate on. Different S3 providers have different limitations here. All of them require:

    • Must be at least 3 characters long
    • Must be at most 63 characters long
    • Must not start or end with a period (.)
    • Must not contain two adjacent periods (..)
    • Must only contain lowercase letters, numbers, periods (.), and hyphens (-).
    contentHash?: Buffer<ArrayBufferLike>
    contentLength?: number
    endpoint?: string

    The endpoint of the S3 service. This is required for all S3 providers.

    The endpoint may contain placeholders for region and bucket, which will be replaced internally with the actual values on use.

    For example, https://{bucket}.s3.{region}.example.com will be replaced with https://my-bucket.s3.us-west-2.example.com if the bucket is my-bucket and the region is us-west-2.

    If the endpoint does not contain a placeholder for the bucket, it will be appended to the path of the endpoint.

    expiresIn?: number

    Seconds.

    region?: string

    The region of the S3 bucket. This value is required for all S3 proviers. However, some providers don't care about its actual value.

    response?: { contentDisposition?: ContentDisposition }

    Headers to set on the response of the S3 service.

    Type declaration

    • OptionalcontentDisposition?: ContentDisposition

      Used to set the file name that browsers display when downloading the file.

      client.presign("foo.jpg", {
      response: {
      contentDisposition: {
      type: "attachment",
      filename: "download.jpg",
      },
      },
      });
    storageClass?: StorageClass
    type?: string

    Content-Type of the file.