From 5d66e2144f6a47b3187811110fd9493fced6ceaf Mon Sep 17 00:00:00 2001 From: DeVeres Date: Wed, 27 Jan 2021 00:12:53 +0300 Subject: [PATCH 1/2] update composer --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index ce513fa..b9a3e39 100644 --- a/composer.json +++ b/composer.json @@ -13,9 +13,9 @@ } ], "require": { - "php": ">=5.5.9", - "illuminate/contracts": "^5.2", - "illuminate/support": "^5.2" + "php": ">=7.2.0", + "illuminate/contracts": "^6.0||^7.0", + "illuminate/support": "^6.0||^7.0" }, "autoload": { "psr-4": { From e00ce492f5ab61c7444924307fcaf839b845c702 Mon Sep 17 00:00:00 2001 From: DeVeres Date: Wed, 27 Jan 2021 01:12:44 +0300 Subject: [PATCH 2/2] Six Issue: the uploaded file was deleted before the callback run. --- src/File.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/File.php b/src/File.php index a24c6b0..6cf63ce 100644 --- a/src/File.php +++ b/src/File.php @@ -115,9 +115,10 @@ public function chunks($name, Closure $closure) if ($chunk == $chunks - 1) { $file = new UploadedFile($filePath, $originalName, 'blob', UPLOAD_ERR_OK, true); + $result = $closure($file); @unlink($filePath); - return $closure($file); + return $result; } }