W3C home > Mailing lists > Public > public-xformsusers@w3.org > June 2013

xf:upload and accept attribute

From: Erik Bruchez <erik@bruchez.org>
Date: Fri, 31 May 2013 18:09:27 -0700
Message-ID: <CAAc0PEWL5QQNmEGR0t-ZB70BJxt5bwMsbu6h+AXBU6Abo5ir+g@mail.gmail.com>
To: public-forms@w3.org, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
All,

While implementing support for the newly-renamed `accept` attribute on
`xforms:upload`, I noticed that in HTML there is more than just
support for mediatypes, and the separator used is different.

We say in XForms [1]:

"Space-separated list of suggested media types"

HTML says [2]:

"a set of comma-separated tokens, each of which must be an ASCII
case-insensitive match for one of the following:

The string audio/* Indicates that sound files are accepted.
The string video/* Indicates that video files are accepted.
The string image/* Indicates that image files are accepted.
A valid MIME type with no parameters Indicates that files of the
specified type are accepted.
A string whose first character is a U+002E FULL STOP character (.)
Indicates that files with the specified file extension are accepted."

I would much prefer if we were fully compatible with HTML here.

I would suggest:

- making `accept` HTML-compatible
- leaving `mediatype` as space-separated tokens, for backward compatibility

Thoughts welcome.

-Erik

[1] http://www.w3.org/MarkUp/Forms/wiki/XForms_2.0#ui-upload
[2] http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#file-upload-state-(type=file)
Received on Saturday, 1 June 2013 01:10:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:48:24 UTC