I generate a temporary word document "docx" in the ivy files\session\ directory. Now I when the user click on a download link, the browser recognize the data as zip. How can I set the content type in the response? asked 17.01.2014 at 17:53 jschori Flavio Sadeghi ♦♦ |
The content type of the file is set automatically by Xpert.ivy by analyzing the file extension. The content type of a file extension is searched first in the cms type system. If it is not found there it is searched in the web container. And finally in a hardcoded list in Xpert.ivy. In Xpert.ivy 5.0 the docx extension is known and the content type should be set automatically. In earlier version the docx extension is not known. You can add the following xml snipet to the webapps/ivy/WEB-INF/web.xml file so that the web container knows the extension and the content type of it:
answered 20.01.2014 at 09:40 Reto Weiss ♦♦ |
You can find out the mimeType of e File in a Java Function.
Note: File f is a java.io.File you must convert the ivyFile to a javaFile If you want to stream the File with The Final function, which you can call in a Ivy-ScriptStep, will look something like that
answered 21.01.2014 at 14:55 Raphael Bürgin |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 17.01.2014 at 17:53
Seen: 20,064 times
Last updated: 18.02.2014 at 17:01