method
UploadsField.AfterRead
AfterRead appends response transforms in order; no callbacks does nothing.
Arguments
| Argument | Type | Description |
|---|---|---|
callbacks | []OutputTransform[[]operation.ReferenceOutput] | The callbacks value. |
Returns
The declared result.
UploadsFieldFull signature
func (f UploadsField) AfterRead(
callbacks ...OutputTransform[[]operation.ReferenceOutput],
) UploadsFieldRelated types
UploadsFieldUploadsField configures links to several files in the target upload collection.
OutputTransformOutputTransform changes one field in the response without changing storage. Register it with the field's AfterRead method; it is not a Hooks list. T is the field's response type, which differs from its stored type for references. Its context supplies response values, which may include related documents and locale fallback. Return Keep, Set, or Clear, as for a write transform. Field read access still runs afterward; visible context data is not permission to expose it. AfterRead runs after resource response hooks on reads and mutation responses, before final field redaction. Registration determines the callback phase. An error stops the response and can roll back an uncommitted mutation.
ReferenceOutputReferenceOutput is the logical read value of a singular relationship. ID is available regardless of whether an authorized document was populated.