SR052
Severity: error
Summary: upload field not found in schema
What this means
An endpoint’s upload.field names a field that does not exist in the resource schema at all. The upload target must be a file-typed field declared in the schema.
Example that triggers this
endpoints:
upload_file:
method: POST
path: /assets/upload
input: [attachment]
upload:
field: attachment
storage: s3
max_size: 5mb
(without attachment in schema:)
How to fix it
Add the upload field to the schema as type: file:
attachment: { type: file, required: true }