def process_bind_param(self, value, dialect):
        if not value:
            return None

        if not isinstance(value, self._upload_type):
            raise ValueError('AttachmentField requires %s, '
                             'got %s instead' % (self._upload_type, type(value)))

        return value.encode()
dataset/ETHPy150Open amol-/depot/depot/fields/sqlalchemy.py/UploadedFileField.process_bind_param/original