Here’s a sample POST object upload request that initiates an object upload for an object named acctg/Checklist.txt in the bucket named finance with AWS Signature Version 2 in-form authentication.
Request headers and form
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form action="https://finance.europe.hcp.example.com" method="post" enctype="multipart/form-data">
<input type="input" name="key" value="acctg/${filename}" /><br />
<input type="hidden" name="AWSAccessKeyId" value="bGdyZWVu" />
<input type="hidden" name="Signature" value="yAk4cp0LQzNo9HMxXsiM9NNSjVs=" />
<input type="hidden" name="Policy" value='eyJleHBpcmF0aW9uIjoiMjAxOS0xMi0zMFQxMjowMDowMC4wMDBaLdwiY29uZGl0aW9ucyI6W3siYnVja2V0IjogIm5zIn0sWyJzdGFydHMtd2l0aCIsICIka2V5IiwgImRpci9kaXIxLyJdLFsic3RhcnRzLXdpdGgiLCAiJHN1Y2Nlc3NfYWN0aW9uX3N0YXR1cyIsICIiXSx7ImFjbCI6ICJwdWJsaWMtcmVhZCJ9LHsieC1hbXotbWV0YS1jbGFzcyI6ICJidXNpbmVzcyJ9LFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCAxMDQ4NTc2MF1dfQ==
/>
<input type="hidden" name="success_action_status" value="201"/>
<input type="hidden" name="acl" value="public-read"/>
<input type="hidden" name="x-amz-meta-class" value="business"/>
<input type="file" name="file" /> <br />
<!-- The elements after this will be ignored -->
<input type="submit" name="submit" value="Upload to HCP" />
</form>
</html>
Security policy
{ "expiration": "2019-12-31T12:00:00.000Z",
"conditions": [
{"bucket": "finance"},
["starts-with", "$key", "acctg/"],
{"acl": "public-read"},
{"x-amz-meta-class": "business"},
["content-length-range", 0, 10485760]
]
}
Response headers
Cache-Control: no-cache,no-store,must-revalidate
Content-Encoding: gzip
Content-Security-Policy: default-src 'self'; script-src…elf'; frame-ancestors 'self';
Content-Type: application/xml;charset=utf-8
Date: Thu, 11 Apr 2019 20:10:25 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
Transfer-Encoding: chunked
Vary: Origin, Access-Control-Request…Access-Control-Request-Method
Vary: Accept-Encoding, User-Agent
x-amz-version-id: 99520854223169
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Response body
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PostResponse>
<Location>https://finance.europe.hcp.example.com/hs3/acctg%2FChecklist.txt</Location>
<Bucket>finance</Bucket>
<Key>acctg/Checklist.txt</Key>
<ETag>"fc7abcc28fdf00ef400d7240546de4b9"</ETag>
</PostResponse>
© 2015, 2020 Hitachi Vantara LLC. All rights reserved.