method
App.Upload
Validate, store, and create an upload document atomically.
Arguments
| Argument | Type | Description |
|---|---|---|
ctx | context.Context | The ctx value. |
collection | string | The collection value. |
input | UploadInput | The input value. |
Returns
The declared result.
(store.Document, error)How it works
Staged objects are rolled back if the document transaction fails. Storage keys are namespaced and opaque.
Full signature
func (application *App) Upload(
ctx context.Context,
collection string,
input UploadInput,
) (store.Document, error)Related types
AppA resolved application bound to operation services.
UploadInputFile bytes and application-owned metadata for one upload.
DocumentA stored document with status and version metadata.