MediaHandler: update

This commit is contained in:
Zankaria 2025-03-25 22:41:04 +01:00
parent dd788acaf0
commit 573c8e2fb6
4 changed files with 16 additions and 16 deletions

View file

@ -2,7 +2,7 @@
namespace Vichan\Service\Media;
use Vichan\Data\ThumbGenerationResult;
use Vichan\Functions\{Fs, Mime};
use Vichan\Functions\{Fs, Metadata};
class FallbackMediaHandler implements MediaHandler {
@ -58,7 +58,7 @@ class FallbackMediaHandler implements MediaHandler {
int $thumb_max_height
) {
list($source_file_path, $source_file_mime, $source_file_kind) = $handle;
$out_path = $media_preferred_out_file_dir . DIRECTORY_SEPARATOR . $media_preferred_out_file_name . '.' . Mime\mime_to_ext($source_file_mime);
$out_path = $media_preferred_out_file_dir . DIRECTORY_SEPARATOR . $media_preferred_out_file_name . '.' . Metadata\mime_to_ext($source_file_mime);
if ($source_file_kind === self::FILE_KIND_UPLOADED) {
if (!Fs\move_or_copy_uploaded($source_file_path, $out_path)) {