1
2/* The following example list two objects in a bucket. */
3
4 var params = {
5 Bucket: "examplebucket",
6 MaxKeys: 2
7 };
8 s3.listObjects(params, function(err, data) {
9 if (err) console.log(err, err.stack); // an error occurred
10 else console.log(data); // successful response
11 /*
12 data = {
13 Contents: [
14 {
15 ETag: "\"70ee1738b6b21e2c8a43f3a5ab0eee71\"",
16 Key: "example1.jpg",
17 LastModified: <Date Representation>,
18 Owner: {
19 DisplayName: "myname",
20 ID: "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
21 },
22 Size: 11,
23 StorageClass: "STANDARD"
24 },
25 {
26 ETag: "\"9c8af9a76df052144598c115ef33e511\"",
27 Key: "example2.jpg",
28 LastModified: <Date Representation>,
29 Owner: {
30 DisplayName: "myname",
31 ID: "12345example25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc"
32 },
33 Size: 713193,
34 StorageClass: "STANDARD"
35 }
36 ],
37 NextMarker: "eyJNYXJrZXIiOiBudWxsLCAiYm90b190cnVuY2F0ZV9hbW91bnQiOiAyfQ=="
38 }
39 */
40 });