Skip to content
Snippets Groups Projects
Verified Commit e37712e2 authored by Damien's avatar Damien
Browse files

FEAT #13253 TIME 0:10 Get encoded archive bloby

parent cecef9fc
No related branches found
No related tags found
No related merge requests found
...@@ -220,6 +220,11 @@ class MessageExchangeController ...@@ -220,6 +220,11 @@ class MessageExchangeController
$fileContent = file_get_contents($pathToDocument); $fileContent = file_get_contents($pathToDocument);
return $response->withJson(['encodedArchive' => base64_encode($fileContent)]); $finfo = new \finfo(FILEINFO_MIME_TYPE);
$mimeType = $finfo->buffer($fileContent);
$response->write($fileContent);
$response = $response->withAddedHeader('Content-Disposition', "attachment; filename=maarch.zip");
return $response->withHeader('Content-Type', $mimeType);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment