Hi,
I run a script from a Web page to download a file, this Perl script and these files to download are located in Linux server. When I click on the link of the file to download from a Windows station via this Web page , a dialog box will be displayed to ask me to "Open" or "Save" the file (.txt, .doc, .xls) but for some extensions like ".dat" or ".xml", the dialog box ask me to save it only and I have not an "Open" button.
How can I add these extensions (.dat and .xml) to my script to be able to open it with Textpad or Notepad?
Can someone help me to fix this issue?
Thanks
here is a part of the script:
======================
open(BFILE, '<', "$file") or return(0);
print $q->header(-type => 'application/x-download',
-attachment => "$file",
'Content-length' => -s "$file"
);
binmode BFILE;
while ( <BFILE> ) {
$ln=$_; $ln =~ s/\n/\r\n/g; print $ln;
}
close (BFILE);
I run a script from a Web page to download a file, this Perl script and these files to download are located in Linux server. When I click on the link of the file to download from a Windows station via this Web page , a dialog box will be displayed to ask me to "Open" or "Save" the file (.txt, .doc, .xls) but for some extensions like ".dat" or ".xml", the dialog box ask me to save it only and I have not an "Open" button.
How can I add these extensions (.dat and .xml) to my script to be able to open it with Textpad or Notepad?
Can someone help me to fix this issue?
Thanks
here is a part of the script:
======================
open(BFILE, '<', "$file") or return(0);
print $q->header(-type => 'application/x-download',
-attachment => "$file",
'Content-length' => -s "$file"
);
binmode BFILE;
while ( <BFILE> ) {
$ln=$_; $ln =~ s/\n/\r\n/g; print $ln;
}
close (BFILE);