public function handleDelete(SS_HTTPRequest $request)
    {
        parse_str($request->getBody(), $vars);
        $count = 0;
        if ($vars['ids']) {
            foreach (explode(',', $vars['ids']) as $id) {
                if ($file = File::get()->byID($id)) {
                    if ($file->canDelete()) {
                        $file->delete();
                        $count++;
                    }
                }
            }
        }

        $result = array(
            'deleted' => $count
        );

        $response = new SS_HTTPResponse(
            Convert::array2json($result), 200
        );

        return $response->addHeader('Content-Type', 'application/json');
    }