def add_blobstore_file(self, request):

    mime_type = None
    blob_filename = ''
    for param in request.parameters_list():
      name = param.name()
      if name == files_blobstore._MIME_TYPE_PARAMETER:
        mime_type = param.value()
      elif name == files_blobstore._BLOBINFO_UPLOADED_FILENAME_PARAMETER:
        blob_filename = param.value()
      else:
        raise_error(file_service_pb.FileServiceErrors.INVALID_PARAMETER)
    if mime_type is None:
      raise_error(file_service_pb.FileServiceErrors.INVALID_PARAMETER)

    random_str = ''.join(
        random.choice(string.ascii_uppercase + string.digits)
        for _ in range(64))
    filename = (_BLOBSTORE_DIRECTORY +
                files._CREATION_HANDLE_PREFIX +
                base64.urlsafe_b64encode(random_str))
    self.blobstore_files.add(filename)
    self.blob_content_types[filename] = mime_type
    self.blob_file_names[filename] = blob_filename
    return filename
We rely on the peers we have connected to to tell us our IP address.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/files/file_service_stub.py/BlobstoreStorage.add_blobstore_file--crossover with--dataset/ETHPy150Open ricmoo/pycoind/pycoind/node/basenode.py/BaseNode._check_external_ip_address