src/SelectUploadField.php
protected function updateFolderName(HTTPRequest $request)
    {
        // check if allowed to select folder
        if (!$this->getCanSelectFolder()) {
            return;
        }

        // Get path from upload
        $folderID = $request->requestVar("{$this->Name}/folder");
        $path = $this->folderPathFromID($folderID);
        if ($path !== false) {
            $this->setFolderName($path);
            $this->selectField->setValue($folderID);
        }
    }
protected function updateFolderName(HTTPRequest $request)
    {
        // check if allowed to select folder
        if (!$this->getCanSelectFolder()) {
            return;
        }

        // Get path from upload
        $folderID = $request->requestVar("{$this->Name}/folder");
        $path = $this->folderPathFromID($folderID);
        if ($path !== false) {
            $this->setFolderName($path);
            $this->selectField->setValue($folderID);
        }
    }
Given a request, ensure that the current field is aware of the selected folder

@param HTTPRequest $request