Page 1 of 1

Hyperlink for download a IFS file

Posted: Sat Jan 21, 2012 9:08 am
by alf1@eikisis.com
I have a IFS file named "file_name.csv". I need to create a hyperlink on a panel like the one that "export csv" creates in a Grid, and behave the same, asking if I want to open or save file.
I tried with javascript "window.open("/path/file_name.csv"), but it no question, and it opens as text.

Re: Hyperlink for download a IFS file

Posted: Mon Jan 23, 2012 10:36 am
by David
Unfortunatley, you cannot get that Open/Save dialog by linking to a static file. The browser displays that dialog when the page sends the file as an attachment, as indicated by this HTTP header:

Code: Select all

Content-Disposition: attachment;
To get this type of behavior, you would need to write a CGI or PHP program to read/output the file and to send the Content-Disposition header along with the file data.