public function getFolderFromDca($folder, DataContainer $dc = null)
    {
        // upload folder
        if (\is_array($folder) && null !== $dc) {
            $callback = $folder;
            $folder = System::importStatic($callback[0])->{$callback[1]}($dc);
        } elseif (\is_callable($folder) && null !== $dc) {
            $method = $folder;
            $folder = $method($dc);
        } elseif (\is_string($folder)) {
            if (false !== strpos($folder, '../')) {
                throw new \Exception("Invalid target path $folder");
            }
        }

        if ($folder instanceof File) {
            $folder = $folder->value;
        } elseif ($folder instanceof FilesModel) {
            $folder = $folder->path;
        }

        if (Validator::isUuid($folder)) {
            $folderObj = $this->getFolderFromUuid($folder);
            $folder = $folderObj->value;
        }

        return $folder;
    }