From 46168368afb127574180f6610958f3beff44ed6f Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Wed, 4 Mar 2020 13:53:52 +0100 Subject: [PATCH 1/3] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 55d71e8..b523969 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 From f29620d9cd2874abf96782de06901751e9d08199 Mon Sep 17 00:00:00 2001 From: Paulo K Date: Fri, 6 Mar 2020 11:11:56 -0300 Subject: [PATCH 2/3] View PDF files in the browser (#51) Co-authored-by: Paulo Sergio Klaus --- backend/Controllers/DownloadController.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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', From 13cdf99352a36939a5e79c0d785138a6756991d3 Mon Sep 17 00:00:00 2001 From: Milos Stojanovic Date: Fri, 6 Mar 2020 15:15:01 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b523969..5560043 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Image gallery (New!) - +