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,8 +7,8 @@ use App\Http\Resources\ArticleCollectionResource;
use App\Http\Resources\ArticleResource;
use App\Models\Article;
use App\Models\ArticleAttachment;
use App\Support\DownloadFile;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class ArticleController extends Controller
{
@@ -87,9 +87,10 @@ class ArticleController extends Controller
$attachment->incrementDownloadCount();
return Storage::disk('public')->download(
$attachment->file_path,
$attachment->original_filename
return DownloadFile::fromDisk(
disk: 'public',
path: $attachment->file_path,
downloadName: $attachment->original_filename
);
}
}