SetSuccessStatusAction - Sets the status success code of the object for this policy based upload.
(status string)
| 281 | // SetSuccessStatusAction - Sets the status success code of the object for this policy |
| 282 | // based upload. |
| 283 | func (p *PostPolicy) SetSuccessStatusAction(status string) error { |
| 284 | if strings.TrimSpace(status) == "" { |
| 285 | return errInvalidArgument("Status is empty") |
| 286 | } |
| 287 | policyCond := policyCondition{ |
| 288 | matchType: "eq", |
| 289 | condition: "$success_action_status", |
| 290 | value: status, |
| 291 | } |
| 292 | if err := p.addNewPolicy(policyCond); err != nil { |
| 293 | return err |
| 294 | } |
| 295 | p.formData["success_action_status"] = status |
| 296 | return nil |
| 297 | } |
| 298 | |
| 299 | // SetUserMetadata - Set user metadata as a key/value couple. |
| 300 | // Can be retrieved through a HEAD request or an event. |
nothing calls this directly
no test coverage detected