Commit bb6e5520 authored by Ad Schellevis's avatar Ad Schellevis

(Captiveportal, new) send Content-Type on template download, chrome still...

(Captiveportal, new) send Content-Type on template download, chrome still ignores the Content-Disposition tag
parent 65975750
...@@ -107,9 +107,10 @@ class ServiceController extends ApiControllerBase ...@@ -107,9 +107,10 @@ class ServiceController extends ApiControllerBase
$response = $result['payload']; $response = $result['payload'];
$this->response->setContentType('application/octet-stream', 'UTF-8'); $this->response->setContentType('application/octet-stream', 'UTF-8');
$this->response->setHeader( $this->response->setHeader(
"Content-disposition:", 'Content-Disposition:',
"attachment; filename=template_" . $templateFileId . ".zip" "Attachment; filename=\"template_" . $templateFileId . ".zip\""
); );
$this->response->setHeader('Content-Type:', 'application/zip');
return base64_decode($response); return base64_decode($response);
} else { } else {
// return empty response on error // return empty response on error
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment