mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 04:04:47 -04:00
Fixes for protected download streams
This commit is contained in:
parent
d522b75d41
commit
6a2600b7dc
@ -30,12 +30,7 @@ class ProtectedDownloadController extends BaseController
|
||||
abort(404, 'File no longer available');
|
||||
}
|
||||
|
||||
UnlinkFile::dispatch(config('filesystems.default'), $hashed_path)->delay(now()->addSeconds(10));
|
||||
|
||||
return response()->streamDownload(function () use ($hashed_path) {
|
||||
echo Storage::get($hashed_path);
|
||||
}, basename($hashed_path), []);
|
||||
|
||||
return response()->download($hashed_path, basename($hashed_path), [])->deleteFileAfterSend(true);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user