method
App.CreateUploadGrants
CreateUploadGrants mints delivery URLs for uploads that the session's owner can currently read. Each grant is bound to the session: logout, revocation, rotation, a password change, or expiry invalidates it.
Arguments
| Argument | Type | Description |
|---|---|---|
ctx | context.Context | The ctx value. |
token | string | The token value. |
collection | string | The collection value. |
requests | []UploadGrantRequest | The requests value. |
lifetime | time.Duration | The lifetime value. |
Returns
The declared result.
([]UploadGrant, error)Full signature
func (application *App) CreateUploadGrants(
ctx context.Context,
token,
collection string,
requests []UploadGrantRequest,
lifetime time.Duration,
) ([]UploadGrant, error)Related types
AppA resolved application bound to operation services.
UploadGrantRequestUploadGrantRequest names one upload document and an optional configured image size. An empty Size selects the original object.
UploadGrantUploadGrant is a short-lived delivery URL for one upload object. The URL authorizes that object without carrying the session token.