From c61fc7f4919fc9b8a8590f712ba94a0ff5463a3a Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 29 Mar 2022 09:14:13 +1100 Subject: [PATCH] Improve memory handling for self update --- app/Http/Controllers/SelfUpdateController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/SelfUpdateController.php b/app/Http/Controllers/SelfUpdateController.php index b8b7bdc89eba..ead8e65e861c 100644 --- a/app/Http/Controllers/SelfUpdateController.php +++ b/app/Http/Controllers/SelfUpdateController.php @@ -100,9 +100,10 @@ class SelfUpdateController extends BaseController $this->testWritable(); - $contents = file_get_contents($this->getDownloadUrl()); + copy($this->getDownloadUrl(), storage_path('app/invoiceninja.zip')); - Storage::disk('local')->put('invoiceninja.zip', $contents); + // $contents = file_get_contents($this->getDownloadUrl()); + // Storage::disk('local')->put('invoiceninja.zip', $contents); $file = Storage::disk('local')->path('invoiceninja.zip');