mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 03:14: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');
|
abort(404, 'File no longer available');
|
||||||
}
|
}
|
||||||
|
|
||||||
UnlinkFile::dispatch(config('filesystems.default'), $hashed_path)->delay(now()->addSeconds(10));
|
return response()->download($hashed_path, basename($hashed_path), [])->deleteFileAfterSend(true);
|
||||||
|
|
||||||
return response()->streamDownload(function () use ($hashed_path) {
|
|
||||||
echo Storage::get($hashed_path);
|
|
||||||
}, basename($hashed_path), []);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ class Helpers
|
|||||||
return $custom_field_parts[0];
|
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)) {
|
if ($custom_fields && property_exists($custom_fields, $field)) {
|
||||||
$custom_field = $custom_fields->{$field};
|
$custom_field = $custom_fields->{$field};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user