mirror of
https://github.com/filegator/filegator.git
synced 2025-08-01 23:00:19 +02:00
Download filename fix
This commit is contained in:
@@ -65,11 +65,11 @@ class DownloadController
|
|||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
});
|
});
|
||||||
|
|
||||||
$contentDisposition = HeaderUtils::DISPOSITION_ATTACHMENT;
|
$contentDisposition = HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_ATTACHMENT, $file['filename'], 'file');
|
||||||
$contentType = 'application/octet-stream';
|
$contentType = 'application/octet-stream';
|
||||||
|
|
||||||
if (pathinfo($file['filename'], PATHINFO_EXTENSION) == 'pdf') {
|
if (pathinfo($file['filename'], PATHINFO_EXTENSION) == 'pdf') {
|
||||||
$contentDisposition = HeaderUtils::DISPOSITION_INLINE;
|
$contentDisposition = HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_INLINE, $file['filename'], 'file');
|
||||||
$contentType = 'application/pdf';
|
$contentType = 'application/pdf';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user