type

UpdateUploadInput

Atomic upload replacement, image edit, document data, and publishing input.

Properties

PropertyTypeDescription
FilenamestringRenames the upload while retaining its current bytes when Reader is nil.
Readerio.ReaderSupplies replacement bytes; nil retains the existing file.
Image*UploadImageEditApplies image focal-point or crop changes; nil retains the saved transformation.
Datastore.ValuesUpdates ordinary upload document fields in the same operation.
ExpectedRevisionintRejects changes based on a stale document revision.
PublishboolPublishes the resulting version when the collection supports drafts.
Draft*boolDraft:true saves working changes without replacing live content. Use Publish for publication; Draft:true cannot be combined with it.
Actor*store.DocumentAuthenticated document used by read and update access rules.
ActorCollectionschema.CollectionSlugIdentifies the exact auth collection owning Actor.
LocaleLocaleOptionsScopes localized document fields for the update.

Full signature

type UpdateUploadInput struct { Filename string Reader io.Reader Image *UploadImageEdit Data store.Values ExpectedRevision int Publish bool // Draft:true saves working changes without replacing live content. // Use Publish for publication; Draft:true cannot be combined with it. Draft *bool Actor *store.Document ActorCollection schema.CollectionSlug Locale LocaleOptions }

Source core/uploads.go:64