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