This posting is somewhat of a continuation of this thread.
To summarize, when the attachment header is sent to IE choosing "save" from the dialogue box works but "open" sometimes (depending on the system) results in the file "not found". This has something to do with the cache in IE (I believe).
The update is that Google's analytics site has a pdf export option for each of its report pages. This works flawlessly (choosing open or save when prompted by the dialogue box). I am guessing that Google is sending something else in the header which I am not that is making theirs work. But, since the site is secure and requires a form based login I can't easily see the header they are sending (by telneting to port 80 for example).
This is my code snippet that is not working.
Any ideas? Thanks!use CGI; my $f; open (OUT,"somefile.pdf") or print STDERR "Can't open $!"; while (<OUT>) { $f .= $_; } close (OUT); my $l = length($f); print CGI->header( -type =>"application/octet-stream", -expires=> '+3d', -charset=>'utf-7', -Content_length => $l, -attachment => "example.pdf", ); print $f; exit;
In reply to HTTP Attachment Header by Rodster001
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |