Sha256: 1cb8ead3810aee74fdf65b3781a80689f2ceb79ef6efac454f17be9f480b2baa

Contents?: true

Size: 1.43 KB

Versions: 15

Compression:

Stored size: 1.43 KB

Contents

Using Amazon S3 with Dojo has the following prerequisites:
    * You must be signed up to use Amazon S3. You can sign up for Amazon S3 at http://aws.amazon.com/s3.
    * Use the provided proxy (/dojox/rpc/s3/proxy.php) with PHP 5.
    * proxy.php requires the following modules:
          o Crypt_HMAC
          o HTTP_Request


To use S3 from Dojo, you need a proxy. You can use the provided proxy example file by renaming 
proxy.example-php to proxy.php and then you must enter your Amazon access key and secret access key
into the proxy.php file on line 3 and 4:

$accessKey = "access key";
$secretAccessKey = "secret access key";

You then use the Dojo RPC service with the "PROXIED-PATH" envelope:

dojo.require("dojox.rpc.Service");
dojo.require("dojox.rpc.ProxiedPath");
var s3Buckets = new dojox.rpc.Service({
	target:"http://s3.amazonaws.com/",
	proxyUrl:"../s3/proxy.php", // the path to the proxy
	transport:"REST",
	envelope:"PROXIED-PATH",
	contentType:"application/json",
	services:{
		myBucket:{
			target:"myBucket",
			parameters:[{type:"string"}]
		}
	}
});


To use the S3 as a Dojo data store you can use the S3JsonRestStore module. First setup an RPC service 
as shown above and then pass the RPC service to the S3JsonRestStore:

dojo.require("dojox.data.S3JsonRestStore");
s3Store = new dojox.data.S3JsonRestStore({service:s3Buckets.myBucket}); // and create a store for it

You can then use the s3Store as a normal Read/Write Dojo Data store.

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
dojo-rails-0.9.4 vendor/assets/javascripts/dojox/data/s3/README
dojo-rails-0.9.3 vendor/assets/javascripts/dojox/data/s3/README
dojo-rails-0.9.2 vendor/assets/javascripts/dojox/data/s3/README
dojo-rails-0.9.1 vendor/assets/javascripts/dojox/data/s3/README
dojo-rails-0.9.0 vendor/assets/javascripts/dojox/data/s3/README
dojo_src-1.5.0 dojo/dojox/data/s3/README
dojo_src-1.4.3 dojo/dojox/data/s3/README
dojo_src-1.4.102 dojo/dojox/data/s3/README
dojo-pkg-1.132.0 data/dojo-release-1.3.2-src/dojox/data/s3/README
dojo-pkg-1.120.0 data/dojo-release-1.2.0-src/dojox/data/s3/README
dojo-pkg-1.121.0 data/dojo-release-1.2.1-src/dojox/data/s3/README
dojo-pkg-1.122.0 data/dojo-release-1.2.2-src/dojox/data/s3/README
dojo-pkg-1.123.0 data/dojo-release-1.2.3-src/dojox/data/s3/README
dojo-pkg-1.130.0 data/dojo-release-1.3.0-src/dojox/data/s3/README
dojo-pkg-1.131.0 data/dojo-release-1.3.1-src/dojox/data/s3/README