Skip to content

Commit ad415c7

Browse files
authored
Merge pull request #7 from codepane/dev
Bugfix: return original file with path if file uploading with path
2 parents 568f33e + 1aed743 commit ad415c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ImageHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public function store(object $image, string $imgPath = null): string
4747
$this->storeImg($storageDisk, $fileName, $optimizedImg);
4848
}
4949

50-
return $fileOriginalName;
50+
$fileBaseName = pathinfo($fileOriginalName, PATHINFO_BASENAME);
51+
52+
return $fileBaseName;
5153
}
5254

5355
/**

0 commit comments

Comments
 (0)