Skip to content

Commit

Permalink
I hate it but it does solve the test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Feb 19, 2024
1 parent b4e3ce1 commit 64d8929
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Assets/Uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public function upload(UploadedFile $file)

$this->write($source, $path = $this->uploadPath($file));

if (app()->runningInConsole()) {
app('files')->delete($source);

return $path;
}

dispatch(fn () => app('files')->delete($source))->afterResponse();

return $path;
Expand Down

0 comments on commit 64d8929

Please sign in to comment.