Skip to content

Commit

Permalink
Merge pull request #45 from MadeHQ/hotfix/upload_tmp_path
Browse files Browse the repository at this point in the history
Update CloudinaryStorage.php
  • Loading branch information
popeshoe authored Aug 15, 2019
2 parents 21f229d + 10692d2 commit 7a1ac20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Storage/CloudinaryStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ public function setFromLocalFile($path, $filename = null, $hash = null, $variant

// Copy the uploaded files to a tmp location with the correct name, so we can let cloudinary deal
// with generating a publicID using the actual filename
$tmpFile = sys_get_temp_dir() . $justFileName;
$tmpFile = str_replace("//", "/", sys_get_temp_dir() . "/" . $justFileName);

if(!move_uploaded_file($path, $tmpFile)) {
throw new \Exception('Could not copy uploaded file to ' . $tmpFile);
}
Expand Down

0 comments on commit 7a1ac20

Please sign in to comment.