Skip to content

Commit

Permalink
unlink tmp file
Browse files Browse the repository at this point in the history
  • Loading branch information
bastihilger committed Aug 4, 2022
1 parent c16ecb0 commit 79f30e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Services/ProjectFolderUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

namespace Kraenkvisuell\NovaCmsPortfolio\Services;

use Exception;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Kraenkvisuell\NovaCmsMedia\API;
use Kraenkvisuell\NovaCmsMedia\Core\Model as MediaModel;
Expand Down Expand Up @@ -174,6 +171,8 @@ protected function importFile($artist, $slideshow, $file, $filename)
$mediaItem = API::upload($tmpPath, null, $newFilename);
$response['status'] = 'success';
$response['reason'] = '';

unlink($tmpPath);
} else {
$response['reason'] = 'already exists';
}
Expand Down

0 comments on commit 79f30e6

Please sign in to comment.