Reputation: 140
I'm using XPages FileUpload control to save some attachments (.xml files) to the document. By default Domino is saving .xml with "text/xml" MIME type. However I need it to be "application/xml". Setting FileUpload control "MIME type" option does not help as Domino recognizes file type and changes it.
Is there a way to accomplish this task and manually switch attachment MIME type to a custom one?
Upvotes: 1
Views: 1352
Reputation: 20384
You might want to look at "the other end". Instead of trying to alter the mime-type when saving (Which I actually doubt Domino does save!!!), change the way the file is served when retrieved. Instead of using the build in URL to access it, use an XAgent. There you can set the MIME-Type header to your hearts desire.
Edit:
The sneaky way: Don't do anything in your application. Talk to your admin. In the website configuration you can specify rules. Provide the pattern for the XML file and overwrite the mime-type header in the configuration. The admin documentation has all the details. You want to use the "custom header"
Upvotes: 1