SetExpires - Sets expiration time for the new policy.
(t time.Time)
| 76 | |
| 77 | // SetExpires - Sets expiration time for the new policy. |
| 78 | func (p *PostPolicy) SetExpires(t time.Time) error { |
| 79 | if t.IsZero() { |
| 80 | return errInvalidArgument("No expiry time set.") |
| 81 | } |
| 82 | p.expiration = t |
| 83 | return nil |
| 84 | } |
| 85 | |
| 86 | // SetKey - Sets an object name for the policy based upload. |
| 87 | func (p *PostPolicy) SetKey(key string) error { |