feat: Update download url signature for k8s env - Close #33
This commit is contained in:
parent
a2e0a60d08
commit
3eed68a9c3
2 changed files with 4 additions and 3 deletions
|
|
@ -182,10 +182,11 @@ class SyncController extends Controller
|
|||
$exists = Storage::disk('public')
|
||||
->exists(sprintf('docs/%s/%s.%s', \tenant()->getKey(), $doc['uuid'], $doc['type']));
|
||||
if ($exists) {
|
||||
array_push($attach, URL::temporarySignedRoute(
|
||||
array_push($attach, config('app.url') . URL::temporarySignedRoute(
|
||||
'docs.download',
|
||||
now()->addDays(30),
|
||||
['tenant' => \tenant()->getKey(), 'uuid' => $doc['uuid']]
|
||||
['tenant' => \tenant()->getKey(), 'uuid' => $doc['uuid']],
|
||||
false
|
||||
));
|
||||
array_push($filesName, $doc['title']);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -110,4 +110,4 @@ Route::middleware(['web', 'admin-secure'])->name('bo.')->group(function () {
|
|||
// Public files download.
|
||||
Route::get('/{tenant}/docs/{uuid}/download', [DocumentController::class, 'download'])
|
||||
->name('docs.download')
|
||||
->middleware('signed');
|
||||
->middleware('signed:relative');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue