code: def raw_data(self, value):
          
          if value:
              try:
                  value = value.read()
              except AttributeError:
                  pass
              b64 = base64.b64encode(value.encode('utf-8'))
              self.data = b64.decode('utf-8')
docs: Set the base64 encoded data using a raw value or file object.