A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.
To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).
Validator.nu Form Upload Input: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Obsolete|https://github.com/validator/validator/wiki/Form-upload-input}} | {{Obsolete|spec=https://github.com/validator/validator/wiki/Form-upload-input}} | ||
To use [[Validator.nu Web Service Interface|Validator.nu as a Web service]] by form-based file upload: | To use [[Validator.nu Web Service Interface|Validator.nu as a Web service]] by form-based file upload: |
Revision as of 14:33, 17 March 2015
This document is obsolete.
For the current specification, see: https://github.com/validator/validator/wiki/Form-upload-input
To use Validator.nu as a Web service by form-based file upload:
- the client issues an HTTP request either to
https://validator.nu/
orhttps://html5.validator.nu/
- the request uses the POST method with an
multipart/form-data
entity body
- common parameters are encoded as form fields
- the document to check is included as the value of a file upload field called
file
- the
file
field must be the last field in the submission
Since the Content-Type
supplied by browsers for the uploaded file is unreliable, the client-supplied Content-Type
is overridden with a synthetic Content-Type
if the filename is supplied and it has a well-known extension. The well-known extensions are html
, htm
, xhtml
, xht
, atom
, rng
, xsl
, xml
and dbk
.
The parameter field values must decode as UTF-8.