forked from leftypol/leftypol
MediaHandler: update
This commit is contained in:
parent
dd788acaf0
commit
573c8e2fb6
4 changed files with 16 additions and 16 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue