src/SelectUploadField.php
public function changeFolder(HTTPRequest $request)
    {
        // CSRF check
        $token = $this->getForm()->getSecurityToken();
        if (!$token->checkRequest($request)) {
            return $this->httpError(400);
        }
        $folderID = $request->postVar('FolderID');
        if ($folderID) {
            $this->FolderSelector()->setLastFolderID($folderID);
        }
    }
public function changeFolder(HTTPRequest $request)
    {
        // CSRF check
        $token = $this->getForm()->getSecurityToken();
        if (!$token->checkRequest($request)) {
            return $this->httpError(400);
        }
        $folderID = $request->postVar('FolderID');
        if ($folderID) {
            $this->FolderSelector()->setLastFolderID($folderID);
        }
    }
process HTTP request to change the upload folder

@param HTTPRequest $request
@throws HTTPResponse_Exception