SetContentDisposition - Sets content-disposition of the object for this policy
(contentDisposition string)
| 211 | |
| 212 | // SetContentDisposition - Sets content-disposition of the object for this policy |
| 213 | func (p *PostPolicy) SetContentDisposition(contentDisposition string) error { |
| 214 | if strings.TrimSpace(contentDisposition) == "" { |
| 215 | return errInvalidArgument("No content disposition specified.") |
| 216 | } |
| 217 | policyCond := policyCondition{ |
| 218 | matchType: "eq", |
| 219 | condition: "$Content-Disposition", |
| 220 | value: contentDisposition, |
| 221 | } |
| 222 | if err := p.addNewPolicy(policyCond); err != nil { |
| 223 | return err |
| 224 | } |
| 225 | p.formData["Content-Disposition"] = contentDisposition |
| 226 | return nil |
| 227 | } |
| 228 | |
| 229 | // SetContentEncoding - Sets content-encoding of the object for this policy |
| 230 | func (p *PostPolicy) SetContentEncoding(contentEncoding string) error { |
nothing calls this directly
no test coverage detected