Google Cloud Platform - Ways of Uploading Data to GCS
Last Updated :
17 Dec, 2020
Before you can harness the power of the cloud, to serve your content, you have to get your data into it. In this article, we will look into all the different ways you can upload data. We all know that Google Cloud Storage (GCS) can serve your binary assets to users worldwide at high speed and low price. But before you can do any of that, you need to get your data into the Google Cloud, which can be done in a few specific ways. Let's look into them in detail.
1. Using Google Cloud Console:
This is the easiest option. This provides you with an in-browser experience where you can easily click to create buckets and folders and then choose or drag and drop the files from your local machine to upload.

2. Using GSUTIL:
This is the Command line tool approach. While the console is fine for easy uploads in simplistic serving situations but for production environments, you often need an automated command-line solution. For this, the GSUTIL tool can be used which is a Python application that lets you access cloud storage from the command line. It provides you with the ability to all sorts of operations like creating buckets, moving objects, or even editing metadata. To use it simply run the GSUTIL program with a myriad of command-line options.
For example, the below command uploads a directory of files from your local machine to the GCS bucket using parallel upload.
gsutil -m cp -r dir gs://my-bucket
The below command lists out specific objects that have a version-specific URL using a wild card:
gsutil ls -a gs://bucket/images/*.jpg
3. Using Client Libraries:
At some point, you might need an interface with the GCS directly from your code rather than going out to a command-line option. You can include the client libraries in your code and call a simple API to get data into a bucket or a folder and regardless of your language it probably has you covered.
4. Using JSON and XML:
If none of the above suits your need there are always the good old JSON and XML APIs which you can let kick off an HTTP POST to upload data directly to the bucket or a folder. It's a bit more complex but it's there in case it fits your use case.

5. Using GCS Transfer Appliance
Now, for the folks with lots and lots of data, it's worth noting that it might not be feasible to upload all of that data from your on-premise systems directly to the Google cloud. For this, the GCS Transfer Appliance can be used. Google ships you a fancy device directly to your location and you can get connected and transfer your files at super high speed.
Similar Reads
Google Cloud Platform - Ways of Serving files from GCS When it comes to the cloud, there is more than one way to serve a file. In, this article, we will walk through all the different ways to serve a file from Google Cloud Storage. It is kind of like having a yard sale, but all the stuff stays in your yard or you decide where it goes. You probably alrea
3 min read
Cloud Storage in Google Cloud Platform (GCP) Google Cloud Storage is a secure, scalable, and high-performance storage solution that lets businesses store, manage, and retrieve data effortlessly. Itâs designed for big data analytics, media storage, backups, and disaster recovery, making it a go-to option for enterprises looking for cost-effecti
8 min read
What is Google Cloud Platform (GCP)? Google Cloud Platform (GCP) is a cloud computing service by Google that helps businesses, developers, and enterprises run applications, store data, and manage workloads on a secure, scalable, and high-performance infrastructure. Whether you're building a website, handling large datasets, or running
15+ min read
Google Cloud Platform - Cloud Storage Google Cloud Storage is unified object storage. In reality, the GCS is the place where you can store and serve static binary assets either for your app to use or directly to your users. But as straightforward, as it sounds, there is a lot going under the hood. Google Cloud Storage The GCP has Bucket
2 min read
Why Google Cloud Platform? Pre-requisite: GCP Google Cloud Platform(GCP) is a collection of calculating services that run on the same structure that Google uses internally for its end-stoner products, similar to Google Search and YouTube. GCP offers a wide range of services, including storehouse, networking, big data, machine
4 min read