Jump to content

Featured Replies

Posted

The progress bar for multiple image uploader accepts only integer values, otherwise it displays NaN instead of current progress and scale is always at 0%. But gallery upload script returns float value as current step. If you upload 4 pics, everything will be fine - 25%, 50%, 75%, 100%. But if you upload 3 pics: 33.3333% => NaN, 66.6666% => NaN, 100%.

To fix this I've changed a line it \applications\gallery\modules\front\gallery\submit.php line 877:

return array( ++$offset, \IPS\Member::loggedIn()->language()->addToStack('processing'), 100 / ( \IPS\Request::i()->totalImages ?: $offset ) * $offset );

To:

return array( ++$offset, \IPS\Member::loggedIn()->language()->addToStack('processing'), intval(100 / ( \IPS\Request::i()->totalImages ?: $offset ) * $offset) );

And now uploader shows correct progress for any number of pics.

I'm not seeing this issue. When I upload 3 images I get 33.33%, 66.66% and then it finishes (we round to two decimal places).

Recently Browsing 0

  • No registered users viewing this page.