forked from leftypol/leftypol
FallbackMediaHandler.php: update
This commit is contained in:
parent
c3f7ed1475
commit
020ab7d4fc
1 changed files with 5 additions and 9 deletions
|
@ -51,23 +51,20 @@ class FallbackMediaHandler implements MediaHandler {
|
|||
|
||||
public function installMediaAndGenerateThumb(
|
||||
mixed $handle,
|
||||
string $media_preferred_out_file_dir,
|
||||
string $media_preferred_out_file_name,
|
||||
string $thumb_preferred_out_file_dir,
|
||||
string $thumb_preferred_out_file_name,
|
||||
string $media_preferred_out_file_basepath,
|
||||
string $thumb_preferred_out_file_basepath,
|
||||
string $thumb_preferred_out_mime,
|
||||
int $thumb_max_width,
|
||||
int $thumb_max_height
|
||||
): MediaInstallResult {
|
||||
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 . '.' . Metadata\mime_to_ext($source_file_mime);
|
||||
$out_path = $media_preferred_out_file_basepath . '.' . Metadata\mime_to_ext($source_file_mime);
|
||||
|
||||
$this->move_or_link_or_copy($source_file_kind, $source_file_path, $out_path);
|
||||
|
||||
$thumb = $this->generateThumb(
|
||||
$handle,
|
||||
$thumb_preferred_out_file_dir,
|
||||
$thumb_preferred_out_file_name,
|
||||
$thumb_preferred_out_file_basepath,
|
||||
$thumb_preferred_out_mime,
|
||||
$thumb_max_width,
|
||||
$thumb_max_height
|
||||
|
@ -77,8 +74,7 @@ class FallbackMediaHandler implements MediaHandler {
|
|||
|
||||
public function generateThumb(
|
||||
mixed $handle,
|
||||
string $preferred_out_file_dir,
|
||||
string $preferred_out_file_name,
|
||||
string $preferred_out_file_basepath,
|
||||
string $preferred_out_mime,
|
||||
int $max_width,
|
||||
int $max_height
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue