Skip to content

Commit

Permalink
Actually lowercase file extension if config is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuablum committed Oct 13, 2023
1 parent 2316439 commit f2860cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Assets/AssetUploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public static function asset(Asset $asset)
protected function uploadPath(UploadedFile $file)
{
$ext = $this->getNewExtension() ?? $file->getClientOriginalExtension();

if (config('statamic.assets.lowercase')) {
$ext = strtolower($ext);
}

$filename = self::getSafeFilename(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME));

$directory = $this->asset->folder();
Expand Down

0 comments on commit f2860cb

Please sign in to comment.