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

ArgumentTypeDescription
ctxcontext.ContextThe ctx value.
tokenstringThe token value.
collectionstringThe collection value.
requests[]UploadGrantRequestThe requests value.
lifetimetime.DurationThe 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)

Source core/upload_grants.go:55

Related types

  • App

    A resolved application bound to operation services.

  • UploadGrantRequest

    UploadGrantRequest names one upload document and an optional configured image size. An empty Size selects the original object.

  • UploadGrant

    UploadGrant is a short-lived delivery URL for one upload object. The URL authorizes that object without carrying the session token.