XF 2.0 Avatar Upload Issue

MarcusJonesy

Active member
Having an issue when uploading an avatar. I assuming my folders and settings are incorrect but just want to confirm this. The error I receive is:



  • RuntimeException: Failed to save image to temporary file; image may be corrupt or check internal_data/data permissions
  • src/XF/Service/User/Avatar.php:263

Stack trace

#0 src/XF/Pub/Controller/Account.php(454): XF\Service\User\Avatar->updateAvatar()
#1 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Account->actionAvatar(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(89): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'avatar', 'json', Object(XF\Mvc\ParameterBag), 'account', Object(XF\Pub\Controller\Account), NULL)
#3 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#4 src/XF/App.php(1894): XF\Mvc\Dispatcher->run()
#5 src/XF.php(328): XF\App->run()
#6 index.php(13): XF::runApp('XF\\Pub\\App')
#7 {main}

array(4) {
["url"] => string(35) "/community/index.php?account/avatar"
["referrer"] => string(71) "http://**************************/index.php?account/account-details"
["_GET"] => array(1) {
["account/avatar"] => string(0) ""
}
["_POST"] => array(7) {
["avatar_crop_x"] => string(1) "0"
["avatar_crop_y"] => string(1) "0"
["use_custom"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(44) "/community/index.php?account/account-details"
["_xfWithData"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}

Any help appreciated.
 
Have you checked to make sure you have enough free space?
Also, have you checked the image itself to confirm if it's corrupted or not?

Hi Tracey.

Yes I have enough free space and I have tried about 10 different images and they are all different files types. Is there any specific server configuration or anything I need to add to the server to achieve this with Xenforo?

The last error message was:

RuntimeException: Failed to save image to temporary file; image may be corrupt or check internal_data/data permissions in src/XF/Service/User/Avatar.php at line 263

  1. XF\Service\User\Avatar->updateAvatar() in src/XF/Pub/Controller/Account.php at line 454
  2. XF\Pub\Controller\Account->actionAvatar() in src/XF/Mvc/Dispatcher.php at line 249
  3. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 89
  4. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
  5. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1894
  6. XF\App->run() in src/XF.php at line 328
  7. XF::runApp() in index.php at line 13
 
Back
Top Bottom