CARVIEW |
Select Language
HTTP/2 200
date: Tue, 22 Jul 2025 10:18:01 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"719e64657047e7df38bb150673f6a0ec"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=RSrRC7u1tTJq7L6IEQZxmgasMRJDYQabNENOo2N9m60KVATlOgDcBSrsTa9ThYR3RM6%2BKdKFfgTRAx%2BfZ4glWvw%2BVIcfXi0zbhX07JftBy6z%2FAHgMp6RMm4dXy%2BbDBrPL6fUbAQkuOS6P6CpasSs1utE0oSdaVGqCU0a1BBfyDhgrta7D5RttCiPJ%2FuT%2FmDPZE2WFJxLQyEPAfTTATdrS24dzo6mLqxt61UBjsbIdA80M6MEnVujOGwEUx9X2Pn5T7fUHcrFvvJuEVX%2FUUorWQ%3D%3D--OrNdQYQUtisYSFDy--0zl%2BExhZi7Wqx6%2FVltYMHA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.379489810.1753179480; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 10:18:00 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 10:18:00 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 9A58:7FB30:55A903:5F8715:687F6558
S3 Client · SaltwaterC/aws2js Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 32
S3 Client
SaltwaterC edited this page Dec 26, 2012
·
57 revisions
aws.load('s3', [accessKeyId], [secretAccessKey])
- s3.get(path, [query], resBodyHandler, callback)
- s3.head(path, callback)
- s3.del(path, callback)
- s3.put(path, headers, reqBodyHandler, callback)
- s3.post(path, headers, reqBodyHandler, callback)
- s3.signUrl(protocol, method, path, expires, headers)
The S3 POST method is not fully implemented. Its use case may be replaced by the s3.put(). The POST method doesn't bring any benefit while implementing multipart/form-data into the API implies a lot of overhead for zero benefits. The existing s3.post() low level method is in use by the S3 Multipart API.
- s3.setCredentials(accessKeyId, secretAccessKey)
- s3.setMaxSockets(numberOfSockets)
- s3.getEndPoint()
- s3.setBucket(bucketName)
- s3.setEndPoint(endpointPrefix)
- s3.createBucket(bucketName, cannedAcl, region, callback)
- s3.setBucketAcl(bucketName, cannedAcl, callback)
- s3.putFile(path, file, cannedAcl, headers, callback)
- s3.putFiles(files, cannedAcl, headers, callback)
- s3.putStream(path, stream, cannedAcl, headers, callback)
- s3.putBuffer(path, buffer, cannedAcl, headers, callback)
- s3.setObjectAcl(path, cannedAcl, callback)
- s3.setObjectMeta(path, cannedAcl, headers, callback)
- s3.getLifeCycle(callback)
- s3.delLifeCycle(callback)
- s3.putLifeCycleRule(id, prefix, expireInDays, callback)
- s3.delLifeCycleRule(id, callback)
- s3.copyObject(source, destination, acl, [headers], callback)
- s3.moveObject(source, destination, acl, [headers], callback)
- s3.delMultiObjects(objects, quiet, callback)
- s3.initUpload(path, cannedAcl, headers, callback)
- s3.abortUpload(path, uploadId, callback)
- s3.completeUpload(path, uploadId, uploadParts, callback)
- s3.putFilePart(path, partNumber, uploadId, fileHandler, callback)
- s3.putStreamPart(path, partNumber, uploadId, stream, headers, callback)
- s3.putBufferPart(path, partNumber, uploadId, buffer, callback)
- s3.putFileMultipart(path, file, cannedAcl, headers, partSize, callback)
var s3 = require('aws2js').load('s3', accessKeyId, secretAccessKey);
All the API specific actions can be made by using the low level methods. The S3 helpers are provided for convenience.
// creates the foo bucket with private access into the us-east-1 region
s3.createBucket('foo', false, false, function (error, result) {
});
// creates the bar bucket with public-read access into the Northern California region
s3.createBucket('bar', 'public-read', 'us-west-1', function (error, result) {
});
// makes the bar bucket to be private accesible
s3.setBucketAcl('bar', 'private', function (error, result) {
});
// uploads the foo.png file into the foo bucket with public-read access
s3.setBucket('foo');
s3.putFile('foo.png', '/path/to/foo.png', 'public-read', {}, function (error, result) {
});
// uploads the buffer contents as the S3 file contents
s3.setBucket('foo');
s3.putBuffer('foo.txt', new Buffer('bar', 'utf8'), 'public-read', {'content-type': 'text/plain'}, function (error, result) {
});
// uploads the Readable Stream contents as the S3 file contents
s3.setBucket('foo');
var stream = fs.ReadStream('./foo.txt'); // may be any object implementing the Readable Stream interface
s3.putStream('foo.txt', stream, 'public-read', {'content-type': 'text/plain', 'content-length': streamLength}, function (error, result) {
});
// changes the acl to private for an existing bar.jpg object of the bar bucket
s3.setBucket('bar');
s3.setObjectAcl('bar.jpg', 'private', function (error, result) {
});
// changes the object meta data in order to specify the cache control header
s3.setBucket('foo');
s3.setObjectMeta('foo.png', 'public-read', {'cache-control': 'public'}, function (error, result) {
})
Clone this wiki locally
You can’t perform that action at this time.