use round instead of floor to make imagesize <1M possible
This commit is contained in:
parent
1a1a1246b6
commit
512e5900e6
|
@ -1141,7 +1141,7 @@ function photos_content(App $a)
|
|||
'$qcomment' => $qcomment,
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
// Dropzone
|
||||
'$max_imagesize' => floor(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000),
|
||||
'$max_imagesize' => round(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000,1),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -1198,7 +1198,7 @@ function photos_content(App $a)
|
|||
'$qcomment' => $qcomment,
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
// Dropzone
|
||||
'$max_imagesize' => floor(Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000),
|
||||
'$max_imagesize' => round(Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000,1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1274,7 +1274,7 @@ function photos_content(App $a)
|
|||
'$qcomment' => $qcomment,
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
// Dropzone
|
||||
'$max_imagesize' => floor(Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000),
|
||||
'$max_imagesize' => round(Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000,1),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -411,7 +411,7 @@ class Conversation
|
|||
'$always_open_compose' => $this->pConfig->get($this->session->getLocalUserId(), 'frio', 'always_open_compose', false),
|
||||
|
||||
// Dropzone
|
||||
'$max_imagesize' => floor(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000),
|
||||
'$max_imagesize' => round(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000,1),
|
||||
|
||||
]);
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ class Compose extends BaseModule
|
|||
]),
|
||||
|
||||
// Dropzone
|
||||
'$max_imagesize' => floor(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000),
|
||||
'$max_imagesize' => round(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000,1),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -186,7 +186,7 @@ class Edit extends BaseModule
|
|||
'$compose_link_title' => $this->t('Open Compose page'),
|
||||
|
||||
// Dropzone
|
||||
'$max_imagesize' => floor(Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000),
|
||||
'$max_imagesize' => round(Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000,1),
|
||||
]);
|
||||
return $output;
|
||||
}
|
||||
|
|
|
@ -1070,7 +1070,7 @@ class Post
|
|||
'$indent' => $indent,
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
// Dropzone
|
||||
'$max_imagesize' => floor(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000),
|
||||
'$max_imagesize' => round(\Friendica\Util\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize')) / 1000000,1),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue