mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-08 13:43:11 +02:00
feat(admin): migrate db dumps from github to platform (#465)
* feat: migrate encoding scripts from github to platform * style: fix StyleCI finding * fix: don't concatenate updated videos when attempting to attach entry on video upload * fix(api): fix field dependencies & feat(admin): upload script from video detail screen
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?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 $script
|
||||
* @return StreamedResponse
|
||||
*/
|
||||
public function show(VideoScript $script): StreamedResponse
|
||||
{
|
||||
/** @var FilesystemAdapter $fs */
|
||||
$fs = Storage::disk(Config::get(VideoConstants::SCRIPT_DISK_QUALIFIED));
|
||||
|
||||
return $fs->download($script->path);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user