Created
February 14, 2018 14:42
-
-
Save bimmerlabs/78eacf309a3a3fd032d1c0ffd81ef036 to your computer and use it in GitHub Desktop.
stream Mojo::Asset::Memory object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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