Working with Check-ins
Last updated
Was this helpful?
Was this helpful?
POST /upload HTTP/1.1
Host: example.org
Content-Length: 1325
Origin: http://example.org
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryePkpFF7tjBAqx29L
------WebKitFormBoundaryePkpFF7tjBAqx29L
Content-Disposition: form-data; name="token"
a43f43ed4340b86c808ac
------WebKitFormBoundaryePkpFF7tjBAqx29L
Content-Disposition: form-data; name="example.png"; filename="example.png"
Content-Type: image/png
... contents of file go here ...
------WebKitFormBoundaryePkpFF7tjBAqx29L--{
"success": true,
"value": {
"file_id": 111,
"url": "https://example.s3.amazonaws.com/",
"expires": "2020-02-03 03:04:00",
"file_field_name": "file",
"fields": {
"policy": "<Base64-encoded policy string>",
"key": "user/user1/${filename}",
"success_action_status": "200",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "AKIAIOSFODNN7EXAMPLE/20151229/us-east-1/s3/aws4_request",
"x-amz-date": "20151229T000000Z",
"x-amz-signature": "<signature-value>",
"x-amz-server-side-encryption": "AES256",
"content-type": "image/png"
}
}
}POST / HTTP/1.1
Host: example.s3.amazonaws.com
Content-Length: 1972
Origin: https://example.s3.amazonaws.com/
Content-Type: multipart/form-data; boundary=WebAppBoundary
--WebAppBoundary
Content-Disposition: form-data; name="policy"
Content-Type: text/plain
<Base64-encoded policy string>
--WebAppBoundary
Content-Disposition: form-data; name="key"
Content-Type: text/plain
user/user1/actual_file_name.png
--WebAppBoundary
Content-Disposition: form-data; name="success_action_status"
Content-Type: text/plain
200
--WebAppBoundary
Content-Disposition: form-data; name="x-amz-algorithm"
Content-Type: text/plain
AWS4-HMAC-SHA256
--WebAppBoundary
Content-Disposition: form-data; name="x-amz-credential"
Content-Type: text/plain
AKIAIOSFODNN7EXAMPLE/20151229/us-east-1/s3/aws4_request
--WebAppBoundary
Content-Disposition: form-data; name="x-amz-date"
Content-Type: text/plain
20151229T000000Z
--WebAppBoundary
Content-Disposition: form-data; name="x-amz-signature"
Content-Type: text/plain
<signature-value>
--WebAppBoundary
Content-Disposition: form-data; name="x-amz-server-side-encryption"
Content-Type: text/plain
AES256
--WebAppBoundary
Content-Disposition: form-data; name="file"; filename="actual_file_name.png"
Content-Type: image/png
... contents of file go here ...
--WebAppBoundary--