'Validate that assigned value is BlobInfo.
Automatically converts from strings and BlobKey instances.'

def validate(self, value):

    if isinstance(value, basestring):
        value = BlobInfo(BlobKey(value))
    elif isinstance(value, BlobKey):
        value = BlobInfo(value)
    return super(BlobReferenceProperty, self).validate(value)
