private function getField($user, $imageIdentifier, $field)
{
$query = $this->getConnection()->createQueryBuilder();
$query->select($field)->from($this->getTableName($user, $imageIdentifier), 'i')->where('user = :user')->andWhere('imageIdentifier = :imageIdentifier')->setParameters([':user' => $user, ':imageIdentifier' => $imageIdentifier]);
$stmt = $query->execute();
$row = $stmt->fetch();
if (!$row) {
throw new StorageException('File not found', 404);
}
return $row[$field];
}