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": { 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; } }