WIP
This commit is contained in:
1 parent
bf69d6733b
commit
ba537b7868
2 files changed
+6
-5
No files matched your search
@@ -8,11 +8,11 @@
|
||||
class ShortFileNamer extends FileNamer
|
||||
{
|
||||
/**
|
||||
* Keep the original file name exactly as it was uploaded.
|
||||
* Generate a short random name for the original file.
|
||||
*/
|
||||
public function originalFileName(string $fileName): string
|
||||
{
|
||||
return pathinfo($fileName, PATHINFO_FILENAME);
|
||||
return Str::random(10);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -20,7 +20,9 @@ public function originalFileName(string $fileName): string
|
||||
*/
|
||||
public function conversionFileName(string $fileName, Conversion $conversion): string
|
||||
{
|
||||
return Str::random(12);
|
||||
$fileName = pathinfo($fileName, PATHINFO_FILENAME);
|
||||
|
||||
return "{$fileName}-{$conversion->getName()}";
|
||||
}
|
||||
|
||||
public function responsiveFileName(string $fileName): string
|
||||
|
||||
Reference in new issue
Block a user