|
|
Question : "Content-Type: application/x-unknown " , different response in IE 4.0 & 5.0
|
|
To make the browser ask "Save File to Disk" , I make "Content-Type: application/x-unknown " and download the file from the remote location successfully. This works perfectly fine in IE 5.0 and NN 4.0 onwards but in IE 4.0 , It displays the file to be downloaded instead of asking "Save File to Disk"
Help Please URGENT
Here is the full code print "Content-Type: application/x-unknown\n"; print "Content-Disposition: attachment; filename=$file_name\n\n"; $output_file = read_file($target_file); print $output_file;
## Sub read_file sub read_file { local($fname) = @_; local($content);
open(FILE, "<$fname") || print "cannot open ".$!;
while() { $content .= $_; } close(FILE);
return $content;
|
Answer : "Content-Type: application/x-unknown " , different response in IE 4.0 & 5.0
|
|
what you can tell the user is to run a small exe or batch file after downloading the file. this exe or batch file would ask the user for a new extension and rename the file.
Alternately you can append a .xxx to the complete file name itself. EG. if filename is resume.doc you send it across as resume.doc.xxx.
|
|
|
|