Skip to content

Instantly share code, notes, and snippets.

@j--w
Last active November 20, 2015 19:54
Show Gist options
  • Save j--w/e41db4761ecc144b5366 to your computer and use it in GitHub Desktop.
Save j--w/e41db4761ecc144b5366 to your computer and use it in GitHub Desktop.
awsm-s3tokenvendor
<Error>
<Code>InvalidAccessKeyId</Code>
<Message>
The AWS Access Key Id you provided does not exist in our records.
</Message>
<AWSAccessKeyId>{ACCESS_KEY_FROM_ENDPOINT}</AWSAccessKeyId>
<RequestId>{RequestId}</RequestId>
<HostId>
{HostId}
</HostId>
</Error>
<html>
<head>
<title>S3 POST Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form action="{S3_ENDPOINT}" method="post" enctype="multipart/form-data">
<input type="hidden" name="key" value="{S3_KEY_FROM_ENDPOINT}">
<input type="hidden" name="AWSAccessKeyId" value="{ACCESS_KEY_FROM_ENDPOINT}">
<input type="hidden" name="acl" value="private">
<input type="hidden" name="success_action_redirect" value="http://localhost/">
<input type="hidden" name="policy" value="{POLICY_FROM_ENDPOINT}">
<input type="hidden" name="signature" value="{SIGNATURE_FROM_ENDPOINT}">
<input type="hidden" name="Content-Type" value="image/png">
<!-- Include any additional input fields here -->
File to upload to S3:
<input name="file" type="file">
<br>
<input type="submit" value="Upload File to S3">
</form>
</body>
</html>
{
"files": [
{
"name": "meetup-logo.png",
"size": 6639
}
]
}
{
"AWS_ACCESS_KEY_ID": "{ACCESS_KEY_FROM_ENDPOINT}",
"tokens": [
{
"s3Key": "{S3_KEY_FROM_ENDPOINT}",
"policy_b64": "{POLICY_FROM_ENDPOINT}",
"signature": "{SIGNATURE_FROM_ENDPOINT}"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment