Fixed files being forced as downloads

This commit is contained in:
Chris Kankiewicz
2025-03-21 13:07:47 -07:00
parent 0fd59a0b2a
commit 40d5a389af
2 changed files with 2 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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());