@classmethod
    def get_instance(cls, supertable, superid):

        if not hasattr(supertable, "_tablename"):
            # tablename passed instead of Table
            supertable = cls.table(supertable)
        if supertable is None:
            return (None, None, None)
        db = current.db
        query = (supertable._id == superid)
        entry = db(query).select(supertable.instance_type,
                                 supertable.uuid,
                                 limitby=(0, 1)).first()
        if entry:
            instance_type = entry.instance_type
            prefix, name = instance_type.split("_", 1)
            instancetable = current.s3db[entry.instance_type]
            query = instancetable.uuid == entry.uuid
            record = db(query).select(instancetable.id,
                                      limitby=(0, 1)).first()
            if record:
                return (prefix, name, record.id)
        return (None, None, None)

# END =========================================================================
Uploads a user file to a GridFS bucket.
dataset/ETHPy150Open sahana/eden/modules/s3/s3model.py/S3Model.get_instance--crossover with--dataset/ETHPy150Open mongodb/mongo-python-driver/gridfs/__init__.py/GridFSBucket.upload_from_stream