Downloads an object from an S3 (or S3-compatible) bucket. When a target path is supplied, the bytes are written to that local file and true is returned; otherwise the body is returned as a UTF-8 string.
s3Download(bucket, object [, target, charset, accessKeyId, secretKey, host])
→ returns any
Writes the object body to disk and returns true on success.
ok = s3Download("my-bucket", "logs/today.txt", expandPath("./today.txt"));
Without a target path, the body is returned directly.
content = s3Download("my-bucket", "logs/today.txt");
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.