WithLocationFunc is an option that decides how url is mapped to S3 bucket and path. Useful when not serving file directly from S3, but from a CDN.
(f func(location string) (url string))
| 78 | // WithLocationFunc is an option that decides how url is mapped to S3 bucket and path. |
| 79 | // Useful when not serving file directly from S3, but from a CDN. |
| 80 | func WithLocationFunc(f func(location string) (url string)) ManagerOptionFunc { |
| 81 | return func(c *ManagerConfig) { |
| 82 | c.locationFunc = f |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | // WithAutoExtension is an option that auto splice extension, default is true. |
| 87 | func WithAutoExtension(auto bool) ManagerOptionFunc { |
no outgoing calls