Merge pull request #7432 from turbo124/v5-develop

Better handling of failed downloads for .zip
This commit is contained in:
David Bomba 2022-05-14 16:52:44 +10:00 committed by GitHub
commit d8c1b6d56d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,11 @@ class SelfUpdateController extends BaseController
nlog("copying release file");
copy($this->getDownloadUrl(), storage_path('app/invoiceninja.zip'));
if(copy($this->getDownloadUrl(), storage_path('app/invoiceninja.zip'))){
nlog("Copied file from URL");
}
else
return response()->json(['message' => 'Download not yet available. Please try again shortly.'], 410);
nlog("Finished copying");