Remove setFilename, getFilename from Session::Http, and use Plack::Response methods instead.
This commit is contained in:
parent
fd8f03a186
commit
8b6bbdb9f7
9 changed files with 28 additions and 77 deletions
|
|
@ -699,12 +699,10 @@ sub www_download {
|
|||
unless $self->session->user->isInGroup($self->downloadUserGroup);
|
||||
|
||||
# Set filename and mimetype
|
||||
if ($self->downloadType eq "csv") {
|
||||
$self->session->http->setFilename($self->downloadFilename,"application/octet-stream");
|
||||
}
|
||||
else {
|
||||
$self->session->http->setFilename($self->downloadFilename, $self->downloadMimeType);
|
||||
}
|
||||
$self->session->response->header( 'Content-Disposition' => qq{attachment; filename="}.$self->downloadFilename().'"');
|
||||
$self->session->response->content_type(
|
||||
$self->downloadType eq 'csv' ? "application/octet-stream" : $self->downloadMimeType
|
||||
);
|
||||
|
||||
$self->session->http->sendHeader;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue