mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -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);
|
||||
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ class Helpers
|
||||
return $custom_field_parts[0];
|
||||
}
|
||||
|
||||
$field = str_replace(["quote","credit"], ["invoice","invoice"], $field);
|
||||
$field = str_replace(["quote","credit"], ["invoice", "invoice"], $field);
|
||||
|
||||
if ($custom_fields && property_exists($custom_fields, $field)) {
|
||||
$custom_field = $custom_fields->{$field};
|
||||
|
Loading…
x
Reference in New Issue
Block a user