diff --git a/README.md b/README.md
index 55d71e8..5560043 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,35 @@ Preview and edit files (New!)
Image gallery (New!)
+## Sponsors
+
+
+
## Typical use cases
- share a folder with colleagues, your team, friends or family
- give students access to upload their work
diff --git a/backend/Controllers/DownloadController.php b/backend/Controllers/DownloadController.php
index 451c793..85c3339 100644
--- a/backend/Controllers/DownloadController.php
+++ b/backend/Controllers/DownloadController.php
@@ -65,13 +65,21 @@ class DownloadController
// @codeCoverageIgnoreEnd
});
+ $contentDisposition = HeaderUtils::DISPOSITION_ATTACHMENT;
+ $contentType = 'application/octet-stream';
+
+ if (pathinfo($file['filename'], PATHINFO_EXTENSION) == 'pdf') {
+ $contentDisposition = HeaderUtils::DISPOSITION_INLINE;
+ $contentType = 'application/pdf';
+ }
+
$streamedResponse->headers->set(
'Content-Disposition',
- HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_ATTACHMENT, $file['filename'], 'file')
+ $contentDisposition
);
$streamedResponse->headers->set(
'Content-Type',
- 'application/octet-stream'
+ $contentType
);
$streamedResponse->headers->set(
'Content-Transfer-Encoding',