File

Native file input with validation, current-file links, failed Turbo submit restore and optional reset

View documentation

Props

A bare <input type="file"> by default — the controllers mount on the input itself, never on a wrapper. The wrapper appears only for current-url or wrapper-class.

Current file: Current file

Signed contract (PDF): Signed contract (PDF)

No old() repopulation

Browsers refuse to pre-fill a file input, so unlike hw:input this component skips the old() merge and a value attribute does nothing. Errors still resolve through the field's error key, and reset-on-success clears the input after a successful turbo:morph.

Native file preservation in a Turbo Frame

Submit with an empty caption to re-render the frame with validation errors. The native FileList survives; a valid submission clears it without persisting the file.

Up to 64 KB. It is validated in memory and never stored.

Leave this empty once to exercise server validation.

Unrelated sibling frame

This node is not replaced when the proof form responds.