Well the documentation is pretty straightforward on this:
Once you've SSH'ed into the Compute Engine instance, you can use the gsutil CLI to upload or download certain files into / from Cloud Storage with gsutil cp. For example, the following CLI command would copy a local file to the desired Cloud Storage bucket:
gsutil cp /path/to/my-file.mp4 gs://my-bucket
Although, in your use-case it would make more sense to do it programmatically by using the Cloud Storage Client Libraries which are available in multiple programming languages. Let's say you want to use PHP for it:
You would first have to install the Client Library with:
composer require google/cloud-storage
Set up authentication by first creating a Cloud IAM Service
Account as mentioned here, giving it a role to access
the Cloud Storage bucket(s) (in this case the role
roles/storage.objectCreator would suffice if you simply want
to upload objects), downloading the JSON key file into the Compute
Engine instance, and setting the environment variable GOOGLE_APPLICATION_CREDENTIALS with:
export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/[FILE_NAME].json"
And then finally, you can upload a file with this sample code in PHP. There are multiple examples offered by Google Cloud when interacting
with Cloud Storage that you can find here.
Alternatively, you can mount a Cloud Storage bucket as a filesystem on the Compute Engine instance, as described in the following page.
delivervideo to users. In your case you areprocessinguploaded videos that are stored on your VM. That needs to be done on the VM (or using an external service that supports Cloud Storage). Then you can upload the processed videos to Cloud Storage. There are tools such asgsutiland Google SDKs that can copy the video files once processing is complete. - John Hanley