mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-20 12:51:30 +02:00
Fixed files being forced as downloads
This commit is contained in:
@@ -29,7 +29,7 @@ class FileController
|
||||
return $response->withStatus(404, $this->translator->trans('error.file_not_found'));
|
||||
}
|
||||
|
||||
$response = $response->withHeader('Content-Disposition', sprintf('attachment; filename="%s"', $file->getFilename()));
|
||||
$response = $response->withHeader('Content-Disposition', sprintf('inline; filename="%s"', $file->getFilename()));
|
||||
$response = $response->withHeader('Content-Type', $this->contentType($file));
|
||||
|
||||
if ($file->getSize() !== false) {
|
||||
|
@@ -29,7 +29,7 @@ class FileControllerTest extends TestCase
|
||||
$this->assertSame(200, $response->getStatusCode());
|
||||
|
||||
$this->assertSame([
|
||||
'Content-Disposition' => ['attachment; filename="README.md"'],
|
||||
'Content-Disposition' => ['inline; filename="README.md"'],
|
||||
'Content-Type' => ['text/plain'],
|
||||
'Content-Length' => ['30'],
|
||||
], $response->getHeaders());
|
||||
|
Reference in New Issue
Block a user