google-cloud-storage

Video Streaming from Google Cloud Storage

笑着哭i 提交于 2020-04-08 10:37:03
问题 How would we go about getting a video from google cloud storage and streaming that video to a mobile device? I dont see anything related to videos in the Java API like there is for getting images with ImagesServiceFactory The videos are only going to be a maximum of 10-15 seconds long if that makes any difference. Any advice on how to proceed here would be great 回答1: There is no difference between streaming a video and downloading any other file from the Cloud Storage. Thus, no special video

Logging Artifacts from MlFlow on GCS Bucket

a 夏天 提交于 2020-03-23 10:19:21
问题 I have a running MlFlow server on GCS VM instance. I have created a bucket to log the artifacts. This is the command I'm running to start the server and for specifying bucket path- mlflow server --default-artifact-root gs://gcs_bucket/artifacts --host x.x.x.x But facing this error: TypeError: stat: path should be string, bytes, os.PathLike or integer, not ElasticNet Note- The mlflow server is running fine with the specified host alone. The problem is in the way when I'm specifying the storage

Fast way of deleting non-empty Google bucket?

时光怂恿深爱的人放手 提交于 2020-03-17 10:00:19
问题 Is this my only option or is there a faster way? # Delete contents in bucket (takes a long time on large bucket) gsutil -m rm -r gs://my-bucket/* # Remove bucket gsutil rb gs://my-bucket/ 回答1: Buckets are required to be empty before they're deleted. So before you can delete a bucket, you have to delete all of the objects it contains. You can do this with gsutil rm -r (documentation). Just don't pass the * wildcard and it will delete the bucket itself after it has deleted all of the objects.

Fast way of deleting non-empty Google bucket?

和自甴很熟 提交于 2020-03-17 10:00:07
问题 Is this my only option or is there a faster way? # Delete contents in bucket (takes a long time on large bucket) gsutil -m rm -r gs://my-bucket/* # Remove bucket gsutil rb gs://my-bucket/ 回答1: Buckets are required to be empty before they're deleted. So before you can delete a bucket, you have to delete all of the objects it contains. You can do this with gsutil rm -r (documentation). Just don't pass the * wildcard and it will delete the bucket itself after it has deleted all of the objects.

How to mark files in a GCP storage bucket as Read Only for “everyone”?

落花浮王杯 提交于 2020-03-05 03:58:50
问题 We have a storage bucket which has sensitive data stored in it, in the form of JSON files. For a PCI compliance, we have to make these files read only. Versioning will be enabled on the bucket so Retention policy can not be used. I tried keeping only one account in the bucket permissions with Read Only access, that (not really) partially serves the purpose. But any user with Editor or Owner role can edit the file permissions and change it back to Editable and modify the file. How to restrict

How to mark files in a GCP storage bucket as Read Only for “everyone”?

怎甘沉沦 提交于 2020-03-05 03:57:52
问题 We have a storage bucket which has sensitive data stored in it, in the form of JSON files. For a PCI compliance, we have to make these files read only. Versioning will be enabled on the bucket so Retention policy can not be used. I tried keeping only one account in the bucket permissions with Read Only access, that (not really) partially serves the purpose. But any user with Editor or Owner role can edit the file permissions and change it back to Editable and modify the file. How to restrict

How can I get access to Google Cloud Storage using an access and a secret key

非 Y 不嫁゛ 提交于 2020-03-05 03:25:09
问题 I have access and a secret key to Google Cloud Storage and I want to instantiate a client using those credentials. I've been looking at tutorials and came across this example: public class QuickstartSample { public static void main(String... args) throws Exception { // Instantiates a client Storage storage = StorageOptions.getDefaultInstance().getService(); /* Perform some bucket action */ } } Is there any way I could pass that access and secret key while instantiating a client, in a fashion

Set metadata for all objects in a Google Storage bucket

跟風遠走 提交于 2020-03-01 06:32:07
问题 I want to set Content-Type metadata to image/jpeg for all objects of a Google Storage bucket. How to do this? 回答1: Using gsutil and its setmeta command: gsutil -m setmeta -h "Content-Type:image/jpeg" gs://YOUR_BUCKET/**/*.jpg Use the -m to activate a parallel update, in case you have a lot of objects. The /**/* pattern will perform a recursive search on any folders that you may have on your bucket. 来源: https://stackoverflow.com/questions/52691451/set-metadata-for-all-objects-in-a-google

Anonymous caller does not have storage.objects.get

∥☆過路亽.° 提交于 2020-03-01 04:20:27
问题 On Google App Engine (GAE) written in Python. I am trying to issue an http post to cloud-speech-to-text api and using URI audio source (Google Cloud Storage Bucket Objects). I am using the following headers; Authorization: BASIC encoded_base64(username:password) But I still keep getting an error response below: { "error": { "code": 403, "message": "Anonymous caller does not have storage.objects.get access to bucket_of_secrets/four_score_seven_years.flac.", "status": "PERMISSION_DENIED" } } So

Anonymous caller does not have storage.objects.get

懵懂的女人 提交于 2020-03-01 04:18:02
问题 On Google App Engine (GAE) written in Python. I am trying to issue an http post to cloud-speech-to-text api and using URI audio source (Google Cloud Storage Bucket Objects). I am using the following headers; Authorization: BASIC encoded_base64(username:password) But I still keep getting an error response below: { "error": { "code": 403, "message": "Anonymous caller does not have storage.objects.get access to bucket_of_secrets/four_score_seven_years.flac.", "status": "PERMISSION_DENIED" } } So