1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-24 19:33:07 +01:00

APP_DOWNLOAD_ATTACHMENTS_VIA

This commit is contained in:
FreeScout 2020-03-07 20:01:57 -08:00
parent c4bf136fbd
commit 1d7be34787
2 changed files with 3 additions and 3 deletions

View File

@ -166,13 +166,13 @@ class PublicController extends Controller
return \Helper::denyAccess();
}
if (config('app.attachments_download_mode') == 'apache') {
if (config('app.download_attachments_via') == 'apache') {
// Send using Apache mod_xsendfile.
return response(null)
->header('Content-Type' , $attachment->mime_type)
->header('Content-Disposition', 'attachment; filename="'.$attachment->file_name.'"')
->header('X-Sendfile', $attachment->getLocalFilePath());
} elseif (config('app.attachments_download_mode') == 'nginx') {
} elseif (config('app.download_attachments_via') == 'nginx') {
// Send using Nginx.
return response(null)
->header('Content-Type' , $attachment->mime_type)

View File

@ -256,7 +256,7 @@ return [
| nginx - attachments are downloaded via nginx's X-Accel-Redirect.
|-------------------------------------------------------------------------
*/
'attachments_download_mode' => env('APP_ATTACHMENTS_DOWNLOAD_MODE', 'php'),
'download_attachments_via' => env('APP_DOWNLOAD_ATTACHMENTS_VIA', 'php'),
/*
|--------------------------------------------------------------------------