Questions tagged [google-cloud-storage]

Google Cloud Storage is a RESTful service for storing and accessing your data on Google's infrastructure. The service combines the performance and scalability of Google's cloud with advanced security and sharing capabilities. ONLY PROGRAMMING RELATED QUESTIONS ARE ON-TOPIC. Questions which are not specifically programming related are OFF-TOPIC for Stack Overflow.

Google Cloud Storage is a RESTful service for storing and accessing your data on Google's infrastructure. The service combines the performance and scalability of Google's cloud with advanced security and sharing capabilities. Learn more about Google Cloud Storage here.

Google Cloud Storage officially supports this tag for general questions about the service. For non-general questions, please email gs-team@google.com instead.

8674 questions
137
votes
31 answers

gcloud command not found - while installing Google Cloud SDK

I am on a mac and am trying to install the Google Cloud SDK (including the gcloud command line utility) using this command in terminal curl https://sdk.cloud.google.com | bash as seen at https://cloud.google.com/sdk/ It got all the way to the end…
109
votes
5 answers

Firebase Storage and Access-Control-Allow-Origin

I'm trying to download files from Firebase Storage through a XMLHttpRequest, but Access-Control-Allow-Origin is not set on the resource, so it's not possible. Is there any way to set this header on the storage server? (let [xhr…
Blacksad
  • 13,286
  • 14
  • 63
  • 78
100
votes
9 answers

gsutil copy returning "AccessDeniedException: 403 Insufficient Permission" from GCE

I am logged in to a GCE instance via SSH. From there I would like to access the Storage with the help of a Service Account: GCE> gcloud auth list Credentialed accounts: - 1234567890-compute@developer.gserviceaccount.com (active) I first made sure…
Christophe
  • 1,758
  • 3
  • 20
  • 28
85
votes
6 answers

How do you make many files public in Google Cloud Storage?

I have 1000 files in Google Cloud Storage to make public, or in general a directory hierarchy. In the Web UI, I can only seem to make one at a time public. Is there some way to do this.
engineerchuan
  • 2,292
  • 3
  • 20
  • 20
73
votes
3 answers

Is it possible to access the compressed data before decompression in HttpClient?

I'm working on the Google Cloud Storage .NET client library. There are three features (between .NET, my client library, and the Storage service) that are combining in an unpleasant way: When downloading files (objects in Google Cloud…
Jon Skeet
  • 1,261,211
  • 792
  • 8,724
  • 8,929
58
votes
9 answers

Read csv from Google Cloud storage to pandas dataframe

I am trying to read a csv file present on the Google Cloud Storage bucket onto a panda dataframe. import pandas as pd import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline from io import BytesIO from google.cloud import…
56
votes
6 answers

How do I identify the Google Cloud Storage URI from my Google Developers Console?

When I attempt load data into BigQuery from Google Cloud Storage it asks for the Google Cloud Storage URI (gs://). I have reviewed all of your online support as well as stackoverflow and cannot find a way to identify the URL for my uploaded data…
52
votes
3 answers

Google Blobstore versus Google Cloud Storage

We have our application hosted on Google app engine for Java and we have a requirement where we want to store the blood donor appreciation certificates (html files) somewhere. So, we can use either Google Blobstore or Google Cloud Storage. I know…
Vik
  • 6,991
  • 23
  • 73
  • 138
52
votes
6 answers

Setting up SSL for Google Cloud Storage static website?

Is there any way to serve a static website (SPA actually) located on Google Cloud Storage via SSL, for that nice SSL address and icon for users to see? Amazon allows this via CloudFront SNI.
SyBer
  • 5,017
  • 11
  • 51
  • 63
49
votes
4 answers

How to upload a file to Google Cloud Storage on Python 3?

How can I upload a file to Google Cloud Storage from Python 3? Eventually Python 2, if it's infeasible from Python 3. I've looked and looked, but haven't found a solution that actually works. I tried boto, but when I try to generate the necessary…
aknuds1
  • 57,609
  • 57
  • 177
  • 299
49
votes
8 answers

How can I move data directly from one Google Cloud Storage project to another?

How can I move data directly from one Google Cloud Storage project to another? I understand how to upload and how to download, but I want to transfer directly between projects.
HannahS
  • 573
  • 1
  • 4
  • 7
48
votes
4 answers

Fastest way to get Google Storage bucket size?

I'm currently doing this, but it's VERY slow since I have several terabytes of data in the bucket: gsutil du -sh gs://my-bucket-1/ And the same for a sub-folder: gsutil du -sh gs://my-bucket-1/folder Is it possible to somehow obtain the total size…
fredrik
  • 7,730
  • 10
  • 56
  • 104
46
votes
14 answers

gsutil ServiceException: 401 Anonymous caller does not have storage.objects.list access to bucket even though I'm loggedin in gcloud

I am trying to create an internal app to upload files to google cloud. I don't want each individual user or this app to log in so I'm using a service account. I login into the service account and everything is ok, but when I try to upload it gives…
Daniel Tranca
  • 788
  • 1
  • 8
  • 17
45
votes
6 answers

How do I upload a base64 encoded image (string) directly to a Google Cloud Storage bucket using Node.js?

Currently, I am using the @google-cloud/storage NPM package to upload a file directly to a Google Cloud Storage bucket. This requires some trickery as I only have the image's base64 encoded string. I have to: Decode the string Save it as a…
JackH
  • 3,665
  • 4
  • 25
  • 51
44
votes
6 answers

Allow Public Read access on a GCS bucket?

I am trying to allow anonymous (or just from my applications domain) read access for files in my bucket. When trying to read the files I get ``` AccessDenied Access denied.
1
2 3
99 100