public function handleUpdate(SS_HTTPRequest $request)
    {
        if (!$this->file->canEdit()) {
            return $this->httpError(403);
        }

        parse_str($request->getBody(), $vars);

        if (isset($vars['parentID'])) {
            $this->file->ParentID = $vars['parentID'];
            $this->file->write();
        }
        $this->file->Title = $vars['title'];
        if (isset($vars['filename']) && !empty($vars['filename'])) {
            $this->file->Filename = $this->file->Parent()->Filename . '/' . $vars['filename'];
        }
        $this->file->write();

        return $this->jsonResponse($this->buildJSON());
    }