Create a new instance of an S3 bucket so that credentials can be managed from a single instance instead of being passed to every method.
The default options to use for the S3 client.
Uses AbortMultipartUpload
.
Checks if a bucket exists.
The name of the bucket to delete. Same restrictions as in S3Client#createBucket.
Optional
options: BucketExistsOptionsUses HeadBucket
.
Uses CompleteMultipartUpload
.
Creates a new bucket on the S3 server.
The name of the bucket to create. AWS the name according to some rules. The most important ones are:
3
(min) and 63
(max) characters long..
), and hyphens (-
).192.168.5.4
).Optional
options: BucketCreationOptionsUses CreateBucket
Deletes a bucket from the S3 server.
The name of the bucket to delete. Same restrictions as in S3Client#createBucket.
Optional
options: BucketDeletionOptionsUses DeleteBucket
.
Uses DeleteObjects
to delete multiple objects in a single request.
Creates an S3File instance for the given path.
The path to the object in the bucket. Also known as object key. We recommend not using the following characters in a key name because of significant special character handling, which isn't consistent across all applications (see AWS docs):
\\
){
)^
)}
)%
)]
)"
)>
)[
)~
)<
)#
)|
)lean-s3 does not enforce these restrictions.
Optional
_options: Partial<CreateFileInstanceOptions>TODO
Implements ListObjectsV2
to iterate over all keys.
Uses ListObjectsV2
to iterate over all keys. Pagination and continuation is handled internally.
Uses ListMultipartUploads
.
Uses ListParts
.
Generate a presigned URL for temporary access to a file. Useful for generating upload/download URLs without exposing credentials.
The operation on .path as a pre-signed URL.
Uses UploadPart
.
A configured S3 bucket instance for managing files.
Example