mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-10-30 01:36:27 +01:00
Added support for user-uploadable avatar
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user