Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Avatar FileSize exception
\forum\applications\dashboard\controllers\class.profilecontroller.php
/** * Set user's photo (avatar). * * @since 2.0.0 * @access public * @param mixed $UserReference Unique identifier, possible username or ID. * @param string $Username. */ public function Picture($UserReference = '', $Username = '') { ... $Upload = new Gdn_UploadImage(); ...
How can I know file size of the uploaded avatar for error handling?
0
Answers
I think it can be controlled from /conf/config.php
I have an upload SIZE limit in php.ini
and when user EXCEEDS it - no error notification is showed
just a white form with black text on the page for newer upload...
terrible feature.
like acoda said you can set
$Configuration['Garden']['Upload']['MaxFileSize'] = '50M';
5OM is very high. 1M is high IMO, if they want more than that then they can use a file host.
grep is your friend.
Thank you very much.
But how can I have my low limit of 150Kb in php.ini and conf
and catch the error?
Btw even cought error like inappropriate file extension causes redirect to "unpacked" not-popup "dialog".
Here must be a popup
and this picture when uploaded file exceedes php.ini upload limit
it should already be there - just change the error message. classuploadimage.php
change this in your definitions file to reflect the size.
The uploaded file was not an image
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Well, I've edited php.ini to 50M
I have no "white screen error" now. No popup nonetheless.
@peregrine, the error is in the class.upload.php.
For example FileUpload Plugin can handle with both limits - and in php.ini and in conf.