I´m stuck in a task I won´t acomplish without thy help.
Its so simple and tricky that irritates! I just want the client´s browser not to go on loading a .xls file. Instead, I want him to show the upload dialog and ask for the file name, the directory etc...
Here´s my code:
my xlsfile = "table.xls";
open(DLFILE, "../uploads/$xlsfile") || die "Error";
@fileholder = <DLFILE>;
close (DLFILE);
print "Content-Type: application/x-download\n";
print "Content-Disposition: attachment; filename=../uploads/$xlsfile\n\n";
print @fileholder;
The result of the code above is that he does show the dialog box, but he displays instead of the name of the file, the name of my CGI script. And also, and worse, the file it saves is almost empty and misformatted.
Any ideas?
Thanks a lot, guys!
André
In reply to Force Download to a .xls file by Andre_br
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |