[dancer-users] send_file for new content
richard.leir at canadiana.ca
Thu Sep 24 14:13:23 BST 2015
On Thu, Sep 24, 2015 at 7:00 AM, <dancer-users-request at dancer.pm> wrote:
> >> return send_file(
> >> \$content,
> >> content_type => 'application/vnd.ms-excel',
> >> filename => "filename.xls",
> >> );
> >> It goes without saying that given recent developments you should
> >> consider using Open Document Format instead ;-)
> > [KB] I will try and inform you as early as possible, thanks
> [KB] As I read from tutorial, send_file returns a file which already
> exists. It does not create a new file with new content.
This example sends html, but you could create other types of data. HTH.
my $ret_html = <<HTDATA;
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
send_file( \$ret_html, content_type => 'text/html');
Cheers -- Rick
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dancer-users