S3Client
public protocol S3Client : AnyObject
S3 client wrapper protocol mainly used for providing an abstraction layer on top of AWS S3 SDK.
-
upload(data:AsynchronouscontentType: bucket: key: ) Uploads a blob to AWS S3.
Throws
S3ClientErrorDeclaration
Swift
func upload(data: Data, contentType: String, bucket: String, key: String) async throwsParameters
dataBlob to upload.
contentTypeContent type of the blob.
bucketName of S3 bucket to store the blob.
keyS3 key to be associated with the blob.
-
download(bucket:Asynchronouskey: ) Downloads a blob from AWS S3.
Throws
S3ClientErrorDeclaration
Swift
func download(bucket: String, key: String) async throws -> DataParameters
bucketName of S3 bucket to storing the blob.
keyS3 key associated with the blob.
Return Value
The data in the bucket
-
delete(bucket:Asynchronouskey: ) Deletes a blob stored AWS S3.
Throws
S3ClientErrorDeclaration
Swift
func delete(bucket: String, key: String) async throwsParameters
bucketName of S3 bucket to storing the blob.
keyS3 key associated with the blob.
S3Client Protocol Reference