Builds an unsigned URI for an S3 bucket or object, without making a request.
s3GenerateURI(bucketNameOrPath [, objectName, type, secure, accessKeyId, secretAccessKey, host, timeout])
→ returns string
s3:// path to a bucket or object, such as s3://mybucket/file.txt.
bucketNameOrPath is a bucket name.
virtualhostvirtualhost, path, arn or s3.
truehttps URI is built. Only applies to virtualhost and path.
lucee.s3.accesskeyid system property or environment variable.
lucee.s3.secretaccesskey system property or environment variable.
https://. Defaults to Amazon AWS.
10000bucket and object, and the type argument style, which can be virtualhost or path. Takes no credential or timeout arguments, so host is the fifth argument.
Virtual-host style against the default endpoint.
uri = s3GenerateURI("my-bucket", "reports/q3.pdf");
Expected Result: https://my-bucket.s3.amazonaws.com/reports/q3.pdf
Builds a URI with the bucket in the path instead of the hostname.
uri = s3GenerateURI("my-bucket", "reports/q3.pdf", "path");
Expected Result: https://minio.example.com/my-bucket/reports/q3.pdf
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.