Customising Flex-Directory plugin (adding images)

I am making some customisations and getting stuck when it comes to adding images. I have added field to the entries.yaml file as a file type (see below).

photo:
  type: file
  label: Photo
  multiple: false
  destination: 'user/pages/images'
  accept:
    - image/*

When viewing in the admin page I do see the field there, however when I select a file to upload I get an exception.

Call to undefined method Grav\Plugin\FlexDirectory\AdminController::data()

the line in the log file is as follows. I am not sure where to go from here.

[2017-03-10 11:58:20] grav.CRITICAL: Call to undefined method Grav\Plugin\FlexDirectory\AdminController::data() - Trace: #0 D:\xampp\htdocs ug\user\plugins\admin\classes\adminbasecontroller.php (214): Grav\Plugin\FlexDirectory\SimpleController->prepareData(Array) #1 [internal function]: Grav\Plugin\Admin\AdminBaseController->taskFilesUpload() #2 D:\xampp\htdocs ug\user\plugins\flex-directory\classes\SimpleControll er.php(100): call_user_func_array(Array, Array) #3 D:\xampp\htdocs ug\user\plugins\flex-directory\ flex-directory.php(76) : Grav\Plugin\FlexDirectory\SimpleController->execute() #4 [internal function]: Grav\Plugin\FlexDirectoryPlugin->onPageInitialized(Object(RocketTheme\ Toolbox\Event\Event), ‘onPageInitializ…’, Object(RocketTheme\Toolbox\Event\EventDispatcher)) #5 D:\xampp\htdocs ug\vendor\symfony\event-dispatcher\EventDispatcher.ph p(184): call_user_func(Array, Object(RocketTheme\Toolbox\Event\Event), ‘onPageInitializ…’, Object(RocketTheme\Toolbox\Event\EventDispatcher)) #6 D:\xampp\htdocs ug\vendor\symfony\event-dispatcher\EventDispatcher.ph p(46): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, ‘onPageInitializ…’, Object(RocketTheme\Toolbox\Event\Event)) #7 D:\xampp\htdocs ug\vendor\rockettheme oolbox\Event\src\EventDispatch er.php(23): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(‘onPageIni tializ…’, Object(RocketTheme\Toolbox\Event\Event)) #8 D:\xampp\htdocs ug\system\src\Grav\Common\Grav.php(277): RocketTheme\Toolbox\Event\EventDispatcher->dispatch(‘onPageInitializ… .’, Object(RocketTheme\Toolbox\Event\Event)) #9 D:\xampp\htdocs ug\system\src\Grav\Common\Processors\PagesProcessor.p hp(25): Grav\Common\Grav->fireEvent(‘onPageInitializ…’) #10 D:\xampp\htdocs ug\system\src\Grav\Common\Grav.php(126): Grav\Common\Processors\PagesProcessor->process() #11 D:\xampp\htdocs ug\system\src\Grav\Common\Grav.php(368): Grav\Common\Grav->Grav\Common{closure}() #12 [internal function]: Grav\Common\Grav::Grav\Common{closure}(‘pages’, ‘Pages’, Object(Closure)) #13 D:\xampp\htdocs ug\system\src\Grav\Common\Grav.php(344): call_user_func_array(Object(Closure), Array) #14 D:\xampp\htdocs ug\system\src\Grav\Common\Grav.php(127): Grav\Common\Grav->__call(‘measureTime’, Array) #15 D:\xampp\htdocs ug\index.php(52): Grav\Common\Grav->process() #16 {main} [] []

I have the same problem. And even, was forced to refuse to use it.

Flex-directory 2.0 has been released with File support. Check it out…

updated to 2.0 and have it all working! thank you very much!