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

Method SetContentDisposition

post-policy.go:213–227  ·  view source on GitHub ↗

SetContentDisposition - Sets content-disposition of the object for this policy

(contentDisposition string)

Source from the content-addressed store, hash-verified

211
212// SetContentDisposition - Sets content-disposition of the object for this policy
213func (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
230func (p *PostPolicy) SetContentEncoding(contentEncoding string) error {

Callers

nothing calls this directly

Calls 2

addNewPolicyMethod · 0.95
errInvalidArgumentFunction · 0.85

Tested by

no test coverage detected