Initial commit
Build / run (push) Has been cancelled

This commit is contained in:
maher
2026-05-14 13:42:10 +02:00
commit 511fad8199
4595 changed files with 385164 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace Common\Files\Response;
use Common\Files\FileEntry;
class XSendFileResponse implements FileResponse
{
/**
* @param FileEntry $entry
* @param array $options
* @return mixed
*/
public function make(FileEntry $entry, $options)
{
$path = storage_path('app/uploads').'/'.$entry->getStoragePath($options['useThumbnail']);
$disposition = $options['disposition'];
header("X-Sendfile: $path");
header("Content-Type: {$entry->mime}");
header("Content-Disposition: $disposition; filename=\"".$entry->getNameWithExtension().'"');
exit;
}
}