fix(s3): add proxy to serve images from s3 to client

refs #321
This commit is contained in:
Yassine Doghri 2023-04-13 11:45:03 +00:00
commit a76724a8cf
74 changed files with 353 additions and 224 deletions

View file

@ -0,0 +1,26 @@
<?php
declare(strict_types=1);
/**
* @copyright 2020 Ad Aures
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
* @link https://castopod.org/
*/
namespace Modules\Media\Controllers;
use CodeIgniter\Controller;
use CodeIgniter\HTTP\Response;
use Modules\Media\FileManagers\FileManagerInterface;
class MediaController extends Controller
{
public function serve(string ...$key): Response
{
/** @var FileManagerInterface $fileManager */
$fileManager = service('file_manager');
return $fileManager->serve(implode('/', $key));
}
}