feat(cms): sync site assets, revalidate webhook, and document download naming

This commit is contained in:
2026-02-10 23:38:31 +08:00
parent c4969cd4d2
commit b6e18a83ec
27 changed files with 1019 additions and 26 deletions

View File

@@ -7,6 +7,7 @@ use App\Models\AuditLog;
use App\Models\Document;
use App\Models\DocumentCategory;
use App\Models\DocumentVersion;
use App\Support\DownloadFile;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
@@ -238,9 +239,10 @@ class DocumentController extends Controller
// Log access
$document->logAccess('download', auth()->user());
return Storage::disk('private')->download(
$version->file_path,
$version->original_filename
return DownloadFile::fromDisk(
disk: 'private',
path: $version->file_path,
downloadName: $version->original_filename
);
}