Skip to content

Instantly share code, notes, and snippets.

@rnicholus
Last active July 8, 2016 20:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rnicholus/eb84f238d938de1ee67a373deaab4e57 to your computer and use it in GitHub Desktop.
Save rnicholus/eb84f238d938de1ee67a373deaab4e57 to your computer and use it in GitHub Desktop.
{
//always included
"expiration": //the expiration date of the policy, set to be 5 minutes from now, in <a href="http://www.w3.org/TR/NOTE-datetime">ISO 8601 format</a>,
"conditions":
[
//always included
{"acl": /*the "canned acl" value, specified in the objectProperties.acl option*/},
//always included
{"bucket": /*the name of the S3 bucket where this file will be sent*/},
//not included in IE9 and older or Android 2.3.x and older
{"Content-Type": /*MIME-type of the associated file, as determined by simple extension checking client-side*/},
//not included in IE9 and older or Android 2.3.x and older
{"success_action_status": "200" /*expected HTTP status code for the response from S3 is the upload was successful*/},
//ONLY included in IE9 and older or Android 2.3.x and older
{"success_action_redirect": /*corresponds to an absolute path based on the iframeSupport.localBlankPagePath*/},
//always included
{"key": /*key name for the associated file*/},
//always included
{"x-amz-meta-qqfilename": /*url-encoded filename*/},
//not included in IE9 and older, Android 2.x.3 and older, or if no size validation options are set
["content-length-range", /*min file size ("0" if not specified)*/, /*max file size ("9007199254740992" if not specified)*/]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment