dedupe create_image_from_data

This commit is contained in:
Shish
2020-02-23 16:05:09 +00:00
parent 394e57103c
commit 674d3fc6fa
9 changed files with 23 additions and 131 deletions

View File

@@ -36,22 +36,6 @@ class FlashFileHandler extends DataHandlerExtension
return in_array(strtolower($ext), $exts);
}
protected function create_image_from_data(string $filename, array $metadata)
{
$image = new Image();
$image->filesize = $metadata['size'];
$image->hash = $metadata['hash'];
$image->filename = $metadata['filename'];
$image->ext = $metadata['extension'];
$image->tag_array = is_array($metadata['tags']) ? $metadata['tags'] : Tag::explode($metadata['tags']);
$image->source = $metadata['source'];
return $image;
}
protected function check_contents(string $tmpname): bool
{
$fp = fopen($tmpname, "r");