MudGuard: leeres file

Beitrag lesen

Hi,

ich hab nen multipart/form-data-Formular, darin befindet sich ein <input type="file" name="datei">
Nun meine frage: welchen wert hat "datei", wenn keine datei übergeben wird?

The current value of a file select is a list of one or more file names.

Wenn kein File angegeben ist, hat ein file select also keinen "current value".

If a control doesn't have a current value when the form is submitted, user agents are not required to treat it as a successful control.

Ein file select ohne File muß also nicht als "successful" betrachtet werden.

When the user submits a form (e.g., by activating a submit button), the user agent processes it as follows.
Step one: Identify the successful controls

Hier fällt das file-select ggf. raus.

Step two: Build a form data set
A form data set is a sequence of control-name/current-value pairs constructed from successful controls

enthält ggf. nur die anderen name-value-Pärchen aus dem Formular.

Step three: Encode the form data set
The form data set is then encoded according to the content type specified by the enctype attribute of the FORM element.
Step four: Submit the encoded form data set

Kein File - keinerlei Übergabe wäre das, was mir am logischsten erschiene.

(alle Zitate aus http://www.w3.org/TR/html401/interact/forms.html)

cu,
Andreas

--
Warum nennt sich Andreas hier MudGuard?
O o ostern ...
Fachfragen unaufgefordert per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.