Skip to content
Corex

FileFieldAnswers

Corex\Forms\Submission\FileFieldAnswers · class · Forms layer

What a request answers a file question with: the file it carried for it, or nothing. A request has two channels. Its body is what the visitor typed, and its file parts are what PHP received as uploads. A file question is answered by the second and never by the first: what the body says under the question’s name was kept as the answer when no file part arrived, and an answer to a file question is read everywhere after this as the number of a stored file. Both ways a submission is taken ask here: a form defined in code, with the file parts its route read, and a flow built in the admin, whose route reads none.

from(array $schema, array $input, array $files): array

Section titled “from(array $schema, array $input, array $files): array”

The answers, with each file question holding the file part sent for it or left out.