Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
bastihilger committed Aug 4, 2022
1 parent 1b90d5c commit 19d3fc2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Services/ProjectFolderUpload.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected function importFile($artist, $slideshow, $file, $filename)
{
$response = [
'status' => 'not_uploaded',
'reason' => 'already exists',
'reason' => 'unknown',
];

$newFilename = $filename;
Expand All @@ -162,7 +162,8 @@ protected function importFile($artist, $slideshow, $file, $filename)
}

$mediaItem = MediaModel::where('original_name', $filename)->first();

Log::debug($filename);
Log::debug($mediaItem);
if (! $mediaItem) {
try {
$tmpPath = Storage::putFileAs('tmp/portfolio-uploads', $file, $filename);
Expand All @@ -172,6 +173,8 @@ protected function importFile($artist, $slideshow, $file, $filename)
} catch (Exception $e) {
Log::debug($e);
}
} else {
$response['reason'] = 'already exists';
}

if ($mediaItem) {
Expand Down

0 comments on commit 19d3fc2

Please sign in to comment.