Announcement

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

    CSV file is downloaded as .txt file in LibertyCore

    Hi Isomorphic,

    We have recently migrated our application to Linux server(Liberty core) from windows(IBM WAS). After migrating to libertycore, we could see a issue in downloading csv file. The content of the file is slightly getting modified as shown in below screen shots.

    When we click on the file in the below grid(grid1.png) the file will be downloaded for the user.

    Click image for larger version

Name:	grid1.png
Views:	49
Size:	8.4 KB
ID:	267941

    1. Expected scenario: When application is hosted on Windows OS csv file(.csv) is getting downloaded properly. (Highlighted in Yellow)

    Click image for larger version

Name:	csv.png
Views:	50
Size:	13.2 KB
ID:	267942


    2. Downloading in Wrong format: But when application is hosted on Linux OS text file (.txt) is getting downloaded instead of csv. (Highlighted in Yellow)

    Click image for larger version

Name:	txt.png
Views:	51
Size:	13.3 KB
ID:	267944

    csv is the expected output.

    Could you please help us in resolving the issue.


    Thanks,
    Manjula
    Attached Files

    #2
    It's not clear if this file is even coming from our software, or from what function - be sure to include basic information like that when posting.

    However, assuming that our software involved in some way: whenever we deliver files to a browser, if the file type hasn't been explicitly specified, we rely on the Java standard MimetypesFileTypeMap to figure out what mime type to output in the HTTP response headers.

    So, your new server probably lacks a valid mime.types file. This would break basically any Java code that does downloading (not just ours), so it is probably the culprit even if this file isn't being delivered by our software.

    Comment


      #3
      Hi Isomorphic,

      The file is coming from DB. In ds.xml the respective ListGridField is defined as binary which will allow the user to view/ download the file.

      Thanks,
      Manjula

      Comment

      Working...
      X