diff --git a/src/Illuminate/Http/FileHelpers.php b/src/Illuminate/Http/FileHelpers.php index 8da4518129ed..ed405509c0a3 100644 --- a/src/Illuminate/Http/FileHelpers.php +++ b/src/Illuminate/Http/FileHelpers.php @@ -57,6 +57,11 @@ public function hashName($path = null) $hash = $this->hashName ?: $this->hashName = Str::random(40); - return $path.$hash.'.'.$this->guessExtension(); + $extension = $this->guessExtension(); + if ($extension) { + $extension = '.'.$extension; + } + + return $path.$hash.$extension; } }