Skip to content

Commit 98d2572

Browse files
committed
Fixed too short folders
1 parent 71eed45 commit 98d2572

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Image/ImageEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private function getTmpPath(string $extension)
107107
public function serializeImage(ImageRepresentation $imageRepresentation): array
108108
{
109109
$signature = Signatures::sign($this->secret, $imageRepresentation->serialize());
110-
return Strings::splitAtIndex($signature, 6);
110+
return Strings::splitAtIndex($signature, 20);
111111
}
112112

113113
public function getImageSignedString(string $signedString): ImageRepresentation

src/Utility/Images.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static function realPath(ImageRepresentation $imageRepresentation): strin
4949
}
5050

5151
$baseCachePath = config('image-engine.original_cache_dir');
52-
[$folder, $name] = Strings::splitAtIndex(md5($imageRepresentation->filePath), 6);
52+
[$folder, $name] = Strings::splitAtIndex(md5($imageRepresentation->filePath), 20);
5353
$cacheFilePath = "{$baseCachePath}/{$folder}/{$name}.{$imageRepresentation->extension}";
5454

5555
Directories::makeRecursive(dirname($cacheFilePath));

0 commit comments

Comments
 (0)