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:
parent
c4bf136fbd
commit
1d7be34787
@ -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)
|
||||
|
@ -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'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user