[Catalyst] "Save as..."
ash_cpan at firemirror.com
Fri Nov 9 14:29:11 GMT 2007
Octavian Rasnita wrote:
> I try to print a file to the browser using:
> $c->res->header("Content-Disposition" =>
> # $c->res->header('Content-Length' => length($content));
> If I try to save the file pressing enter on the link to download the
> file, the window that asks me if I want to save it appears, but after
> I press the "Save" button, nothing happends, and it doesn't ask me for
> the name of the file.
> But if I right-click on that link and chose "Save as..." from the
> context menu, it always ask me immediately for the name of that file.
> Can you tell me what other headers do I need to print, or what else
> should I need to do in order to be able to save the file by just
> clicking the link (pressing enter on it)?
I do the following:
filename="$name - $date.pdf"});
The only difference I can see there is a space after the ';'
More information about the Catalyst