SR051

Severity: error

Summary: upload field exists in schema but is not type file

What this means

An endpoint’s upload.field names a field that exists in the schema but is not declared as type: file. Only file-typed fields can be used as upload targets — they map to multipart form data handling in the runtime.

Example that triggers this

schema:
  title: { type: string, required: true }
endpoints:
  upload_file:
    method: POST
    path: /assets/upload
    input: [title]
    upload:
      field: title
      storage: s3
      max_size: 5mb

How to fix it

Change the referenced field’s type to file in the schema:

title: { type: file, required: true }

Back to top

Shaperail documentation lives in the same repository as the framework so every release has versioned instructions. See the latest release for the most recent version.

This site uses Just the Docs, a documentation theme for Jekyll.