Class Index | File Index

Classes


Class S3

S3 contains wrappers around the JetS3t API for accessing Amazon's S3 storage service.

s3 is a global instance of the S3 class.


Defined in: S3.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
S3()
You probably want to use the global variable s3.
Field Summary
Field Attributes Field Name and Description
 
The default name used for buckets: your-aws-access-key-id.TurKit.
Method Summary
Method Attributes Method Name and Description
 
deleteObject(bucketName, key)
 
deleteObjectRaw(bucketName, key)
Remove the object with the given key from the bucket with the given bucketName.
 
Extracts the bucket name and key from an S3 URL.
 
getURL(bucket, key)
Creates an S3 URL given a bucket and a key.
 
putFile(bucketName, file)
 
putFileRaw(bucketName, file)
Create a public object in S3 based on a file.
 
putObject(bucketName, s3Object)
 
putObjectRaw(bucketName, key, data)
Create a public object in S3 based on the suplied data.
 
putString(bucketName, key, stringData)
 
putStringRaw(bucketName, key, stringData)
Create a public object in S3 based on a string.
Class Detail
S3()
You probably want to use the global variable s3.
Field Detail
defaultBucketName
The default name used for buckets: your-aws-access-key-id.TurKit.
Method Detail
deleteObject(bucketName, key)
Calls S3#deleteObjectRaw inside of TraceManager#once.
Parameters:
bucketName
key

deleteObjectRaw(bucketName, key)
Remove the object with the given key from the bucket with the given bucketName. If only one parameter is supplied, it assumes it is an S3 URL, and attempts to extract the bucket name and key from that.

bucketName is optional. If you do not provide it, the name S3#defaultBucketName will be used.

Parameters:
bucketName
key

getBucketAndKey(url)
Extracts the bucket name and key from an S3 URL. For instance, given http://s3.amazonaws.com/hello/hi.txt, returns {bucket:"hello", key:"hi.txt"}.
Parameters:
url

getURL(bucket, key)
Creates an S3 URL given a bucket and a key.
Parameters:
bucket
key

putFile(bucketName, file)
Calls S3#putFileRaw inside of TraceManager#once.
Parameters:
bucketName
file

putFileRaw(bucketName, file)
Create a public object in S3 based on a file. The name given to this object will be randomly generated. Returns the URL for the object.

bucketName is optional. If you do not provide it, the name S3#defaultBucketName will be used.

If there is only 1 parameter, it will be interpreted as file.

Parameters:
bucketName
file

putObject(bucketName, s3Object)
Calls S3#putObjectRaw inside of TraceManager#once.
Parameters:
bucketName
s3Object

putObjectRaw(bucketName, key, data)
Create a public object in S3 based on the suplied data. Returns the URL for the object. This function will create the bucket if it doesn't exist.

bucketName is optional. If you do not provide it, the name S3#defaultBucketName will be used.

key is optional. If you do not provide it, the key will be a random string of characters with an .html extension.

If there is only 1 parameter, it will be interpreted as stringData.

Parameters:
bucketName
key
data

putString(bucketName, key, stringData)
Calls S3#putStringRaw inside of TraceManager#once.
Parameters:
bucketName
key
stringData

putStringRaw(bucketName, key, stringData)
Create a public object in S3 based on a string. Returns the URL for the object.

bucketName is optional. If you do not provide it, the name S3#defaultBucketName will be used.

key is optional. If you do not provide it, the key will be a random string of characters with an .html extension.

If there is only 1 parameter, it will be interpreted as stringData.

Parameters:
bucketName
key
stringData

Documentation generated by JsDoc Toolkit 2.1.0 on Tue Jun 08 2010 19:53:20 GMT-0400 (EDT)