Skip to content

Commit

Permalink
Create folder if not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed Feb 12, 2019
1 parent 3fd4cce commit bed00ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Service/LocalImageUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function uploadImage(string $url): string
// Check if file already exists
if (!\file_exists($path)) {
// Save the file
\mkdir(dirname($path));
\file_put_contents($path, $file);
}

Expand Down

0 comments on commit bed00ee

Please sign in to comment.