CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 18:24:47 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/"b491ccea05f3b1ec9a76e07e45c2b162"
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=MrEP2U443HqvMJXzG6Dhd2KCW4xf5oDy6fNFKhaRnW8xBzq8K63dsLEOAK6cuZLtHQdPU9VCA0P%2Beo7AYABgXFhhDkoDmwX03VPP5vrdAxxUfn%2FXWCt6CGIAxAwyMQKQV5tKrmrlX4K1ixH%2FQ7C8Q%2F07RuC7P3cB89WuSafK55plAxtLYSlpu%2FDUsspGN2%2Fv1uG6mUM7GKt6XKRI8914Y0B%2F32GXkROjY25iqTLZur81OroLkb5mE63kvl8R58MbRWQ%2BCu9VJWMVNa620grUfw%3D%3D--IZpzJrKE5jKrbCQx--KYZveswSnQurgoQCDsGPCA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1351392452.1753381487; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 18:24:47 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 18:24:47 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: DACC:2A1F80:119393:14F91E:68827A6E
s3.signUrl() · SaltwaterC/aws2js Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 32
s3.signUrl()
SaltwaterC edited this page Jul 30, 2012
·
1 revision
Low level method for creating pre-signed URLs to be used with a standard HTTP client.
s3.signUrl(protocol, method, path, expires, headers)
- 'protocol' - a string indicating the protocol. Accepted values: 'http' or 'https'. Throws an Error otherwise.
- 'method' - a string indicating the HTTP method for the pre-signed URL. Must be one of the following: 'GET', 'HEAD', 'POST', 'PUT', or 'DELETE'. If you don't like to yell in your code, you can passed the lower cased versions such as 'get', 'head', etc. Throws an Error otherwise.
- 'expires' - a Date object indicating the expiration time. Obviously, in order to produce useful output from this function, the Date must be in the future, but I won't stop you to shoot yourself in the foot. Throws an Error if the argument is not a Date object.
- 'headers' - an object containing the HTTP headers you may want to pass to the HTTP request, such as the x-amz-* metadata headers.
This method returns a pre-signed URL that you may use with a standard HTTP client. The most common usage of this method is for generating temporary download URLs for private resources. Since there's a 'method' argument, you may use the method for any of the accepted HTTP methods by the S3 API.
var time = new Date();
time.setMinutes(time.getMinutes() + 60);
s3.setBucket('johnsmith').signUrl('https', 'GET', '/photos/puppy.jpg', time);
// => https://johnsmith.s3.amazonaws.com/photos/puppy.jpg?AWSAccessKeyId=AKIAEXAMPLE&Signature=rucSbH0etc
Clone this wiki locally
You can’t perform that action at this time.