![]() |
|
|
|
Amazon S3 REST Wrapper
Project Home • Blog • Forums • Known Issues • External Project Link • Contact Project
Author: Joe Danziger (All RIAForge projects by this author) Description:
A CFC for managing all aspects of Amazon's Simple Storage Service, including file and directory (bucket) operations. Uses a REST interface to perform all operations. Meant to be integrated into existing applications.
The CFC has the following methods: * init(accessKeyID, secretAccessKey) - initialize CFC (both parameters required). * getBuckets() - List all buckets. * putBucket(bucketName, acl, storageLocation) - create a new bucket (acl is optional and defaults to public-read, storageLocation is optional and defaults to non-EU. Use 'EU' for the European location contraint). * getBucket(bucketName, prefix, marker, maxKeys, ShowVersions) - get contents of a bucket (prefix is optional and matches on the beginning of a key, marker is optional and results start from there, maxKeys is optional and restricts the number of objects returned). * deleteBucket(bucketName) - delete a bucket (bucket must be empty). * putObject(bucketName, fileKey, contentType, HTTPtimeout, cacheControl, cacheDays, acl, storageClass, keyName, uploadDir) - puts an object into a bucket (HTTPtimeout is in seconds - default is 300; cacheControl tells browser to cache object - default is true; cacheDays default is 30; acl = access control list; storageClass = S3 Storage Class; keyName defaults to fileKey; uploadDir defaults to current directory). * getObject(bucketName, fileKey, minutesValid) - get link to an object (minutesValid is optional and defaults to 60). * copyObject(oldBucketName, oldFileKey, newBucketName, newFileKey) - copies an object. * renameObject(oldBucketName, oldFileKey, newBucketName, newFileKey) - renames an object. * deleteObject(bucketName, fileKey) - delete an object from a bucket. * objectExists(bucketName, fileKey) - determines if object exists in bucket. * setBucketVersioning(bucketName,versioningStatus) - sets versioning on a bucket. Valid values are 'Enabled' and 'Suspended' * getBucketVersioning(bucketName) - gets current versioning status of bucket. NOTE: You may also access your objects via: http://bucketname.s3.amazonaws.com/name-of-the-object
Recent Blog Entries:
12/15/08 Another New Version: 1.7
12/11/08 New Version: 1.6 2/12/08 New Streamlined Version 1.4 11/30/07 Version 1.3 Released
Last Update:
Added objectExists method to check if item exists on S3. Does a HEAD request for metadata and does not retrieve entire object.
Issue Tracker:
To enter issues for this (or any other) project, you must be logged in. Subversion Access: You may access this project's Subversion repository with your client here: http://svn.riaforge.org/amazons3. To view files and changelists associated with this repository, go here: http://amazons3.riaforge.org/index.cfm?event=page.svnbrowse. Anonymous users have read access to the repository while the administrator has write access. This project is sharing its code via Subversion. Subversion is an open source source control method. You may find more information about Subversion here: http://subversion.tigris.org/ |
Adobe and the Adobe product names are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.