mirror of
https://github.com/filegator/filegator.git
synced 2025-08-20 07:42:09 +02:00
Merge branch 'master' of github.com:filegator/filegator
This commit is contained in:
29
README.md
29
README.md
@@ -28,6 +28,35 @@ Preview and edit files (New!)
|
|||||||
|
|
||||||
Image gallery (New!)
|
Image gallery (New!)
|
||||||
|
|
||||||
|
## Sponsors
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="middle">
|
||||||
|
<a href="https://www.linkpreview.net/?utm_campaign=Sponsored%20GitHub%20FileGator" target="_blank">
|
||||||
|
<img title="Preview Web Links with our Free API service. Get JSON Response for any URL" width="177px" src="https://www.linkpreview.net/images/logo-dark.png">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center" valign="middle">
|
||||||
|
<a href="https://www.getping.info/?utm_campaign=Sponsored%20GitHub%20FileGator" target="_blank">
|
||||||
|
<img title="Trigger an email notification with a simple GET request" width="177px" src="https://www.getping.info/images/logo.png">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center" valign="middle">
|
||||||
|
<a href="https://www.ticksel.com/?utm_campaign=Sponsored%20GitHub%20FileGator" target="_blank">
|
||||||
|
<img title="Friendly website analytics made for humans" width="177px" src="https://interactive32.com/images/ticksel.png">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td align="center" valign="middle">
|
||||||
|
<a href="https://interactive32.com/?utm_campaign=Sponsored%20GitHub%20FileGator" target="_blank">
|
||||||
|
<img title="Modern approach to software development" width="177px" src="https://interactive32.com/images/logo.png">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr><tr></tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
## Typical use cases
|
## Typical use cases
|
||||||
- share a folder with colleagues, your team, friends or family
|
- share a folder with colleagues, your team, friends or family
|
||||||
- give students access to upload their work
|
- give students access to upload their work
|
||||||
|
@@ -65,13 +65,21 @@ class DownloadController
|
|||||||
// @codeCoverageIgnoreEnd
|
// @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(
|
$streamedResponse->headers->set(
|
||||||
'Content-Disposition',
|
'Content-Disposition',
|
||||||
HeaderUtils::makeDisposition(HeaderUtils::DISPOSITION_ATTACHMENT, $file['filename'], 'file')
|
$contentDisposition
|
||||||
);
|
);
|
||||||
$streamedResponse->headers->set(
|
$streamedResponse->headers->set(
|
||||||
'Content-Type',
|
'Content-Type',
|
||||||
'application/octet-stream'
|
$contentType
|
||||||
);
|
);
|
||||||
$streamedResponse->headers->set(
|
$streamedResponse->headers->set(
|
||||||
'Content-Transfer-Encoding',
|
'Content-Transfer-Encoding',
|
||||||
|
Reference in New Issue
Block a user