feat(cms): sync site assets, revalidate webhook, and document download naming
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user