Generate the url and form fields used for a presigned s3 post¶
Description¶
Generate the url and form fields used for a presigned s3 post
Usage¶
Arguments¶
-
Bucket(character): The name of the bucket to presign the post to. Note that bucket related conditions should not be included in the
Conditionsparameter. -
Key(character): Key name, optionally add
${filename}to the end to attach the submitted filename. Note that key related conditions and fields are filled out for you and should not be included in theFieldsorConditionsparameter. -
Fields(list): A list of prefilled form fields to build on top of. Note that if a particular element is included in
Fieldsit will not be automatically added toConditions; you must specify a condition for it as well. -
Conditions(list): A list of conditions to include in the policy. Each element is either a named list for an exact-match condition, e.g.
list(acl = "public-read"), or a plain list for an array-style condition, e.g.list("starts-with", "$key", "uploads/")orlist("content-length-range", 1, 10485760). -
ExpiresIn(numeric): The number of seconds the presigned post is valid for. By default it expires in an hour (3600 seconds).
Value¶
A list with two elements: url and fields. url is the url to post to. fields is a list of form fields and values to include in the post.
Request syntax¶
svc$generate_presigned_post(
Bucket = "string",
Key = "string",
Fields = list(),
Conditions = list(),
ExpiresIn = 3600
)