protected function getTargetPath(Request $request)
    {
        $targetPath = $request->request->get('target_path');
        if (!$targetPath) {
            $targetPath = $request->query->get('target_path');
        }

        return $targetPath;
    }