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>
Message-ID: <MOELJNHNHEHNIMLMBJKGOEHFCAAA.honkkis@tml.hut.fi>
------- 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
tiff.

-------- 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"/>
</upload>

this would result in the following instance:

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

-mikko
Received on Thursday, 7 February 2002 05:38:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 10 June 2009 18:12:10 GMT