def delete(): filename = request.args(0) if not filename: raise HTTP(401, 'Required argument filename missing.') db = current.plugin_ckeditor.db table_upload = current.plugin_ckeditor.settings.table_upload db(table_upload.upload == filename).delete() # delete the file from storage current.plugin_ckeditor.unlink(filename)