MCPcopy
hub / github.com/minio/minio-go / SetSuccessStatusAction

Method SetSuccessStatusAction

post-policy.go:283–297  ·  view source on GitHub ↗

SetSuccessStatusAction - Sets the status success code of the object for this policy based upload.

(status string)

Source from the content-addressed store, hash-verified

281// SetSuccessStatusAction - Sets the status success code of the object for this policy
282// based upload.
283func (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.

Callers

nothing calls this directly

Calls 2

addNewPolicyMethod · 0.95
errInvalidArgumentFunction · 0.85

Tested by

no test coverage detected