google-cloud-storage

File listing from google cloud storage

*爱你&永不变心* 提交于 2020-03-01 01:49:05
问题 For a project I'm doing, I will have files stored in Google's Cloud Storage and am building a web app to interface to those files. I would like my app to show a list of the files (or objects may be the appropriate name) stored in my bucket. I'm completely new to web development and google apis. I've been researching how to do this and have found this bit of code... Storage storage = new Storage(httpTransport, jsonFactory, credential); ObjectsList list = storage.objects().list("bucket-name")

How to list all files in Google Storage bucket in a short time?

微笑、不失礼 提交于 2020-02-24 05:21:44
问题 I have a Google Storage bucket that contains more than 20k+ filenames. Is there any way to list all the filenames in the bucket in a short time? 回答1: It depends on what you mean by "short", but: One thing you can do to speed up listing a bucket is to shard the listing operation. For example, if your bucket has objects that begin with English alphabetic characters you could list each letter in parallel and combine the results. You could do this with gsutil in bash like this: gsutil ls gs:/

How to list all files in Google Storage bucket in a short time?

泄露秘密 提交于 2020-02-24 05:20:52
问题 I have a Google Storage bucket that contains more than 20k+ filenames. Is there any way to list all the filenames in the bucket in a short time? 回答1: It depends on what you mean by "short", but: One thing you can do to speed up listing a bucket is to shard the listing operation. For example, if your bucket has objects that begin with English alphabetic characters you could list each letter in parallel and combine the results. You could do this with gsutil in bash like this: gsutil ls gs:/

How to list all files in Google Storage bucket in a short time?

那年仲夏 提交于 2020-02-24 05:20:35
问题 I have a Google Storage bucket that contains more than 20k+ filenames. Is there any way to list all the filenames in the bucket in a short time? 回答1: It depends on what you mean by "short", but: One thing you can do to speed up listing a bucket is to shard the listing operation. For example, if your bucket has objects that begin with English alphabetic characters you could list each letter in parallel and combine the results. You could do this with gsutil in bash like this: gsutil ls gs:/

can't upload > ~2GB to Google Cloud Storage

早过忘川 提交于 2020-02-23 09:58:10
问题 Trace below. The relevant Python snippet: bucket = _get_bucket(location['bucket']) blob = bucket.blob(location['path']) blob.upload_from_filename(source_path) Which ultimately triggers (from the ssl library): OverflowError: string longer than 2147483647 bytes I assume there is some special configuration option I'm missing? This is possibly related to this ~1.5yr old apparently still-open issue: https://github.com/googledatalab/datalab/issues/784. Help appreciated! Full trace: [File "/usr/src

How to authenticate google APIs with different service account credentials?

浪子不回头ぞ 提交于 2020-02-20 10:31:06
问题 As anyone who has ever had the misfortune of having to interact with the panoply of Google CLI binaries programmatically will have realised, authenticating with the likes of gcloud , gsutil , bq , etc. is far from intuitive or trivial, especially when you need to work across different projects. I am running various cron jobs that interact with Google Cloud Storage and BigQuery for different projects. Since the cron jobs may overlap, renaming config files is clearly not an option, and nor

Create folder google cloud storage bucket .NET Client Library

浪子不回头ぞ 提交于 2020-02-08 03:22:33
问题 I'm looking to at a way to create a folder inside a bucket using the following client library: https://cloud.google.com/storage/docs/json_api/v1/json-api-dotnet-samples I've looked at the following thread, and it appears I need to use the simple method upload. Creating folder in bucket google cloud storage using php I can't see any way of being able to specify a uploadtype , all requests appear to be uploadType=resumable . Looking at the above post and a fiddler trace I need to use uploadType

Making a Cloud Storage bucket accessible only by a certain service account

给你一囗甜甜゛ 提交于 2020-02-06 19:47:51
问题 I have an storage bucket that I created on GCP. I created the bucket following the instructions described here (https://cloud.google.com/storage/docs/creating-buckets). Additionally, I created it using uniform bucket-level access control. However, I want the objects in the bucket to be accessible by instances running under a certain service account. Although, I do not see how to do that. In the permissions settings, I do not see how I can specify a service account for read-write access. 回答1:

Google Cloud Storage ACL not working for bucket

与世无争的帅哥 提交于 2020-02-05 06:38:20
问题 I granted access to certain users by their emails on my bucket, hosted on Google Cloud Storage. (like... jane@gmail.com). however, whenever that person is logged in to their gmail account on chrome, they can't access the file. it just says permission denied. what's going on? the link i'm using is something like: http://storage.googleapis.com/my-bucket/my-object and on my dashboard, i've DEFINITELY configured their gmail accounts to be able to access my bucket (and also even specific files). i

Google Cloud Storage ACL not working for bucket

ⅰ亾dé卋堺 提交于 2020-02-05 06:37:05
问题 I granted access to certain users by their emails on my bucket, hosted on Google Cloud Storage. (like... jane@gmail.com). however, whenever that person is logged in to their gmail account on chrome, they can't access the file. it just says permission denied. what's going on? the link i'm using is something like: http://storage.googleapis.com/my-bucket/my-object and on my dashboard, i've DEFINITELY configured their gmail accounts to be able to access my bucket (and also even specific files). i