Added support for user-uploadable avatar

This commit is contained in:
Andy Miller
2017-03-29 22:41:24 -07:00
parent 5d2f182fc0
commit 7af4d3b767
14 changed files with 51 additions and 16 deletions

View File

@@ -339,8 +339,12 @@ class AdminBaseController
}
// Set destination
$destination = Folder::getRelativePath(rtrim($settings->destination, '/'));
$destination = $this->admin->getPagePathFromToken($destination);
if ($this->grav['locator']->isStream($settings->destination)) {
$destination = $this->grav['locator']->findResource($settings->destination, false, true);
} else {
$destination = Folder::getRelativePath(rtrim($settings->destination, '/'));
$destination = $this->admin->getPagePathFromToken($destination);
}
// Create destination if needed
if (!is_dir($destination)) {