public function delete(SS_HTTPRequest $request)
    {
        // Check form field state
        if ($this->parent->isDisabled() || $this->parent->isReadonly()) {
            return $this->httpError(403);
        }

        // Protect against CSRF on destructive action
        $token = $this->parent->getForm()->getSecurityToken();
        if (!$token->checkRequest($request)) {
            return $this->httpError(400);
        }

        // Check item permissions
        $item = $this->getItem();
        if (!$item) {
            return $this->httpError(404);
        }

        $memberID = Member::currentUserID();

        $res = false;
        try {
            // Owner can always delete
            if ($memberID && $item->OwnerID == $memberID) {
                $res = true;
            } else {
                $res = $item->canDelete();
            }
        } catch (Exception $ex) {

        }

        if (!$res) {
            return $this->httpError(403);
        }

        // Delete the file from the filesystem. The file will be removed
        // from the relation on save
        // @todo Investigate if references to deleted files (if unsaved) is dangerous
        $item->delete();

        if (Controller::has_curr()) {
            return Controller::curr()->redirectBack();
        }
        return $this;
    }