Media type wild cards

25 views
Skip to first unread message

Jørn Wildt

unread,
Mar 10, 2015, 10:42:26 AM3/10/15
to api-...@googlegroups.com
Has anyone done any work on media type wild card specifications (like filename wild cards)?

In HTML forms we can have <input type="file" accept=""> where the accept attribute contains a comma separated list of media types (see http://www.w3.org/TR/1998/REC-html40-19980424/interact/forms.html#adef-accept).

But that seems rather cumbersome if my server accepts all kinds of images. In that case I would like to write <... accept="image/*">.

So ... is there any prior work on this?

My specific scenario is to be able to specify accepted media types in a upload-action in Mason.

/Jørn

darrel...@gmail.com

unread,
Mar 10, 2015, 10:52:03 AM3/10/15
to api-...@googlegroups.com
What kind of work are you looking for?  I have a parser that deals with the wildcards and the qvalues if that is of any use.

Darrel

Sent from Surface

--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft.
For more options, visit https://groups.google.com/d/optout.

Jørn Wildt

unread,
Mar 10, 2015, 11:02:02 AM3/10/15
to api-...@googlegroups.com

Mostly some sort of standard for what is possible/well known syntax.

/Jørn

Peter Williams

unread,
Mar 10, 2015, 1:50:25 PM3/10/15
to api-...@googlegroups.com
What about the `media-range` production from section 14.1 of <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>?

Peter

Jørn Wildt

unread,
Mar 11, 2015, 3:26:49 AM3/11/15
to api-...@googlegroups.com
@Peter, thanks, that was the kind of thing I was looking for.

/Jørn
Reply all
Reply to author
Forward
0 new messages