Avatar

Level 4

That is a 2 way stick.

The why you should change the Mime type is that the associations File Type --> application in most OS is done by Mime type.

But, this also means that a end-user migth create the association of your Mime type to LC:Designer and puft, your system failed.

Apart from randomizing the Mime type of the file when you send it in the HTTP Response object you'll never be sure it is working properly, and even then its a best efford aproach at its best.

I'm at all not for trying to control the UI you're not supposed to control (Browser, Reader, and so on), but to do it its very simple. When you set up the HTTP header in the HTTP Response object (in Java, in other languages i don't know how its called but it should be similar) you should set (among other sings) the name of the file, the size of the file and most importantly the content type (this is here you put the mime type of your file).

This is extra Livecycle. This is the responsability of the web application your're using.

An example of setting headers:

response.setContentType("application/pdf"); //<-------------------mime type goes here
response.setHeader("Content-disposition", "inline; filename=myPDFFile.pdf");
response.setHeader("Content-Length", "" + bytes.length);

This can cause more hard than good, if you're using a framework you might even not be able to do this if you're not savvy enough in the framework you're using. But that is a question you should put to the community of the tech you're using to build your web app.

Edit: XDP is plain text (like XML, its a markup language).