W3C home > Mailing lists > Public > www-forms-editor@w3.org > February 2002

Files sent with <upload> do not include mime type or file name

From: Mikko Honkala <honkkis@tml.hut.fi>
Date: Thu, 7 Feb 2002 12:38:46 +0200
To: <www-forms-editor@w3c.org>
------- COMMENT

<xforms:upload> control in Jan 2002 Last call spec does not save the file's mime type or filename into the instance, so those
parameters are not submitted to the server.  Encodings hexBin / base64 do not by themselves include mime type / filename.

A use case: an e-mail input form, where you can attach files. The user can upload any type of file.
The server/person receiving the mail cannot know the type / name of the file.

Even if the upload control has the restriction
<upload mediaType="image/*"/>, the receiver would still not know whether it is a png, gif, jpeg or

-------- Proposed solution:

Add two optional child elements to 'upload' element: 'mediaType' and 'fileName'. These would have single node binding.

An example:

<upload ref="attachment">
	<mediaType ref="@mediatype"/>
	<fileName ref="@filename"/>

this would result in the following instance:

<attachment mediatype="image/png" filename="xforms.png">asodjfaosldjf</attachment>

Received on Thursday, 7 February 2002 05:38:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:38:05 UTC