PresignedPutObject - Returns a presigned URL to upload an object without credentials. URL can have a maximum expiry of upto 7days or a minimum of 1sec.
(ctx context.Context, bucketName, objectName string, expires time.Duration)
| 88 | // without credentials. URL can have a maximum expiry of upto 7days |
| 89 | // or a minimum of 1sec. |
| 90 | func (c *Client) PresignedPutObject(ctx context.Context, bucketName, objectName string, expires time.Duration) (u *url.URL, err error) { |
| 91 | if err = s3utils.CheckValidObjectName(objectName); err != nil { |
| 92 | return nil, err |
| 93 | } |
| 94 | return c.presignURL(ctx, http.MethodPut, bucketName, objectName, expires, nil, nil) |
| 95 | } |
| 96 | |
| 97 | // PresignHeader - similar to Presign() but allows including HTTP headers that |
| 98 | // will be used to build the signature. The request using the resulting URL will |
no test coverage detected