Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
stream Mojo::Asset::Memory object
# streams $zipfile created in memory (not saved anywhere)
# should work similar with Excel::Writer::XLSX
# (I generate and return the zip file in a Mojo::IOLoop Subprocess)
$self->res->headers->content_disposition(
'attachment; filename=' . $filename . '.zip;');
$self->res->headers->content_type('application/zip');
$self->reply->asset(Mojo::Asset::Memory->new->add_chunk($zipfile));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.