Skip to content

Commit abaf839

Browse files
authored
Update FileManagerService.php
1 parent 8505744 commit abaf839

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Service/FileManagerService.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @method public setRelativeDirectory(@var string $directory): @return static
2929
* @method public getMimeTypes(): @return array
3030
* @method public getMimeType(@var string $key): @return string|array|null
31-
* @method public getMimeContent(@var string $file, @var bool $absolute = false): @return string
31+
* @method public getMimeContent(@var string $filename, @var bool $absolute = false): @return string
3232
* @method public getFileContent(@var string $relativeFile): @return string
3333
* @method public exists(@var string $filePath, @var bool $absolute = false): @return bool
3434
* @method public createSlug(@var string $string): @return string
@@ -798,7 +798,7 @@ private function getFileInfo(SplFileInfo $file): array
798798
'extension' => $file->getExtension(),
799799
// 'mime' => \mime_content_type(filename: $file->getPathname()) // 'mime' => $imageSize['mime'] ?? null
800800
// 'mime' => $this->mime->guessMimeType(path: $file->getPathname())
801-
'mime' => $this->getMimeContent(file: $file->getPathname(), absolute: true)
801+
'mime' => $this->getMimeContent(filename: $file->getPathname(), absolute: true)
802802
];
803803
}
804804

@@ -916,7 +916,7 @@ public function upload(UploadedFile|array $files, string $folder, string $newNam
916916
'filemtime' => $file->getMTime(),
917917
'extension' => (!empty($file->getExtension())) ? $file->getExtension() : \pathinfo(path: $filename, flags: PATHINFO_EXTENSION),
918918
// 'mime' => \mime_content_type(filename: $file->getPathname())
919-
'mime' => $this->getMimeContent(file: $file->getPathname(), absolute: true)
919+
'mime' => $this->getMimeContent(filename: $file->getPathname(), absolute: true)
920920
];
921921

922922
// Upload file
@@ -1252,3 +1252,4 @@ public function move(string $origine, string $target, bool $overwrite = false):
12521252
}
12531253
}
12541254

1255+

0 commit comments

Comments
 (0)