How to change a content type when storing non-xml data using

Hi Everyone,
I’m new to Tamino and i was wondering how do i go about setting the content type via the Interactive interface when storing non-xml data. Currently, I’ve managed to store a SMIL file into Tamino. However, i opened it using Tamino X-plorer and it states content type is of text/html. Please help

qawe

Hi,

I think your problem is caused by the lack of a mime-type registration for type “application/smil” on either the client, the server or possibly both.

When you use the Interactive Interface to send a _Process request to Tamino, the input is obtained from an form field, and the request-type for the form submission is “multipart/form-data”. The processing of such requests is described in RFC1867:

3.3 use of multipart/form-data
The definition of multipart/form-data is included in section 7. A boundary is selected that does not occur in any of the data. (This selection is sometimes done probabilisticly.) Each field of the form is sent, in the order in which it occurs in the form, as a part of the multipart stream. Each part identifies the INPUT name within the original HTML form. Each part should be labelled with an appropriate content-type if the media type is known (e.g., inferred from the file extension or operating system typing information) as application/octet-stream.

So in your case it looks as if the client machine is unable to prepare a suitable content-type header because .smil is not registered as a mime type.

Does this help at all?

It gets worse…

If you are using Internet Explorer as your client browser, the way he identifies mime-types is probably involved in your problem too.

I found information >here< (see the section But MSIE makes up its own rules)… and >here< which suggests that IE is determining the mime type of your uploaded file by inspection of the file’s contents. I looked at a few smi files and they look pretty much like (x)html. They include tags like and . This might explain why IE submitted your file as text/html. So this looks like an IE-related problem.

There may be an easy way round this, but I’m sorry I don’t know what it is.

Here’s a small java program that stores non-XML objects from input files and sets the Content-Type to application/smi. It works for me, and when I load the resulting non-XML object by docname in my browser, the RealOne player (for smi files) is loaded correctly.

Hope it helps.
ProcessNonXMLFile.java (4.68 KB)