To use gsutil to perform a streaming upload from a process to a Cloud Storage object, pipe the data to the gsutil cp command and use a dash for the source URL.
The following example streams the data produced by the collect_measurements process into the data_measurements Cloud Storage object:
collect_measurements | gsutil cp - gs://my_app_bucket/data_measurements
Hope it works!!
To become a Google certified professional cloud architect, join GCP Training today.