modify the example of upload and pubsub