public function delete(string $id) : bool
    {
        $query = $this->storageTable->find('all', [
            'conditions' => [self::FILE_STORAGE_FOREIGN_KEY => $id]
        ]);
        $entity = $query->first();

        if (is_null($entity)) {
            return false;
        }

        if ($this->storageTable->delete($entity)) {
            $this->removeThumbnails($entity);

            return true;
        }

        return false;
    }