Ervan uitgaande dat u uw INSERT-query wilt wijzigen (er is slechts één INSERT-query in de code die u hebt gepost), is dit wat u moet wijzigen:
if (empty($file->error)) {
$sql = 'INSERT INTO `'.$this->options['db_table']
.'` (`name`, `size`, `type`, `title`, `description`, `uid`)'
.' VALUES (?, ?, ?, ?, ?, ?)';
$query = $this->db->prepare($sql);
$query->bind_param(
'sisss',
$file->name,
$file->size,
$file->type,
$file->title,
$file->description,
$_SESSION['userid']
);
$query->execute();
$file->id = $this->db->insert_id;
}