mirror of
https://github.com/friendica/friendica
synced 2024-11-10 03:42:53 +00:00
Calculate image size if not provided
This commit is contained in:
parent
b692146533
commit
91a12295ff
1 changed files with 4 additions and 0 deletions
|
@ -1241,6 +1241,10 @@ class Photo
|
|||
*/
|
||||
public static function storeWithPreview(Image $image, int $uid, string $resource_id, string $filename, int $filesize, string $album, string $description, string $allow_cid, string $allow_gid, string $deny_cid, string $deny_gid): int
|
||||
{
|
||||
if ($filesize == 0) {
|
||||
$filesize = strlen($image->asString());
|
||||
}
|
||||
|
||||
$width = $image->getWidth();
|
||||
$height = $image->getHeight();
|
||||
|
||||
|
|
Loading…
Reference in a new issue