Usage
deleteObject
Deletes an object.
/**
* @bucketName The bucket name the object resides in.
* @uri The file object uri to delete.
*
* @return Returns true if the object is deleted successfully.
*/
boolean function deleteObject( required string bucketName = variables.defaultBucketName, required string uri );downloadObject
Downloads an object from a bucket.
/**
* @bucketName The bucket in which to store the object.
* @uri The destination uri key to use when saving the object.
* @filepath The file path write the object to, if no filename given filename from uri is used.
* @HTTPTimeout The HTTP timeout to use.
* @getAsBinary Treat the response body as binary instead of text.
* @encryptionAlgorithm The server side encryption algorithm to use. Usually "AES256". Not needed if using custom encryptionKey
* @encryptionKey The base64 encoded AES 356 bit key for server side encryption.
*
* @return The object's eTag.
*/
struct function downloadObject(
required string bucketName = variables.defaultBucketName,
required string uri,
required string filepath,
numeric HTTPTimeout = variables.defaultTimeOut,
boolean getAsBinary = "no",
string encryptionAlgorithm = variables.defaultEncryptionAlgorithm,
string encryptionKey = variables.defaultEncryptionKey
)getAccessControlPolicy
Gets a bucket's or object's ACL policy.
getBucket
Lists information about the objects of a bucket.
getBucketLocation
Gets the S3 region for the provided bucket name.
getBucketVersionStatus
Get the versioning status of a bucket.
getFileMimeType
Determines the MIME type from the file extension. If a type cannot be determined, it returns binary/octet-stream by default.
getObjectInfo
Get an object's metadata information.
listBuckets
List all the buckets associated with your Amazon credentials.
objectExists
Check if an object exists in the bucket.
putBucket
Creates a new bucket.
putObject
Puts an object into a bucket.
putObjectFile
Puts an object from a local file into a bucket.
setBucketVersionStatus
Sets the versioning status for a bucket.
Last updated
Was this helpful?