Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Mime type of a download

    How to set the mime type of a download?

    I have:

    Code:
    DataSource.get( "dokumente" ).downloadFile( listGrid.getSelectedRecord(), "f_datei", null );
    When I download a ".doc", or ".xls" file, it works fine , and the browser recognizes the download as a Word/Excel file, but with ".docx" or ".xlsx" files, it tries to open the downloads with notepad. How can I change this? Must I explicitely set the mime types somewhere ?

    I am using SmartGWT 3.0p EE, and Firefox 13

    #2
    Generally you configure this on the servlet engine itself. For example, for Tomcat, there is a mime.types file where you can list the right mime type for each file extension.

    Comment


      #3
      Thank you! It worked!

      Comment

      Working...
      X