mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-23 23:34:29 +02:00
* feat: add playlist resources * style: fix StyleCI findings * fix(admin): address nova exceptions
34 lines
835 B
PHP
34 lines
835 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Controllers\Wiki\Video\Script;
|
|
|
|
use App\Constants\Config\VideoConstants;
|
|
use App\Http\Controllers\Controller;
|
|
use App\Models\Wiki\Video\VideoScript;
|
|
use Illuminate\Filesystem\FilesystemAdapter;
|
|
use Illuminate\Support\Facades\Config;
|
|
use Illuminate\Support\Facades\Storage;
|
|
use Symfony\Component\HttpFoundation\StreamedResponse;
|
|
|
|
/**
|
|
* Class ScriptController.
|
|
*/
|
|
class ScriptController extends Controller
|
|
{
|
|
/**
|
|
* Download dump.
|
|
*
|
|
* @param VideoScript $videoscript
|
|
* @return StreamedResponse
|
|
*/
|
|
public function show(VideoScript $videoscript): StreamedResponse
|
|
{
|
|
/** @var FilesystemAdapter $fs */
|
|
$fs = Storage::disk(Config::get(VideoConstants::SCRIPT_DISK_QUALIFIED));
|
|
|
|
return $fs->download($videoscript->path);
|
|
}
|
|
}
|