forked from leftypol/leftypol
MimeMapMediaHandler.php: implement installMedia
This commit is contained in:
parent
a67d81d94f
commit
262728cea9
1 changed files with 9 additions and 0 deletions
|
@ -69,6 +69,15 @@ class MimeMapMediaHandler implements MediaHandler {
|
||||||
return new MediaInstallResult($thumb, $out_path);
|
return new MediaInstallResult($thumb, $out_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function installMedia(mixed $handle, string $preferred_out_file_basepath): string {
|
||||||
|
list($file_path, $file_mime, $file_kind) = $handle;
|
||||||
|
$out_path = $preferred_out_file_basepath . '.' . Metadata\mime_to_ext($file_mime);
|
||||||
|
|
||||||
|
$this->move_or_link_or_copy($file_kind, $file_path, $out_path);
|
||||||
|
|
||||||
|
return $out_path;
|
||||||
|
}
|
||||||
|
|
||||||
public function generateThumb(
|
public function generateThumb(
|
||||||
mixed $handle,
|
mixed $handle,
|
||||||
string $preferred_out_file_basepath,
|
string $preferred_out_file_basepath,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue