google-cloud-storage

How to stream the videos stored on google cloud storage bucket?

末鹿安然 提交于 2021-01-27 12:47:21
问题 I have stored videos on google cloud storage browser. I want to play these videos on my frontend. For that I need the video URL. But the problem is, whenever I navigate to that URL, the file gets downloaded. What do I need to do to get the streaming video URL of my stored object? 回答1: I accomplished this using video.js. <html> <head> <link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet"> <style> .video-js { width: 600px; height: 600px; } </style> </head> <body> <video-js

Python read .json files from GCS into pandas DF in parallel

浪尽此生 提交于 2021-01-27 11:26:45
问题 TL;DR: asyncio vs multi-processing vs threading vs. some other solution to parallelize for loop that reads files from GCS, then appends this data together into a pandas dataframe, then writes to BigQuery... I'd like to make parallel a python function that reads hundreds of thousands of small .json files from a GCS directory, then converts those .jsons into pandas dataframes, and then writes the pandas dataframes to a BigQuery table. Here is a not-parallel version of the function: import gcsfs

Python read .json files from GCS into pandas DF in parallel

蹲街弑〆低调 提交于 2021-01-27 11:23:32
问题 TL;DR: asyncio vs multi-processing vs threading vs. some other solution to parallelize for loop that reads files from GCS, then appends this data together into a pandas dataframe, then writes to BigQuery... I'd like to make parallel a python function that reads hundreds of thousands of small .json files from a GCS directory, then converts those .jsons into pandas dataframes, and then writes the pandas dataframes to a BigQuery table. Here is a not-parallel version of the function: import gcsfs

Google Service Account Authentication PHP

假装没事ソ 提交于 2021-01-27 07:46:47
问题 I am trying to authenticate a service account so that I can use the access token with the client JSON_API library. I have viewed these articles: https://code.google.com/p/google-api-php-client/source/browse/trunk/examples/prediction/serviceAccount.php https://code.google.com/p/google-api-php-client/wiki/UsingTheLibrary https://developers.google.com/storage/docs/authentication#service_accounts https://developers.google.com/accounts/docs/OAuth2#scenarios Here's my PHP Code <?php require_once

Bucket is requester pays bucket but no user project provided

余生颓废 提交于 2021-01-27 06:09:07
问题 I am trying to POST image to google cloud storage via multipart request using their JSON API, but I am receiving an error: "code": 400, "message": "Bucket is requester pays bucket but no user project provided." HERE IS MY REQUEST: POST /upload/storage/v1/b<my_bucket_here>/o? uploadType=multipart&name=testPostman HTTP/1.1 Host: www.googleapis.com Content-Length: 2139 Authorization: Bearer ya29.<my_token_here> Cache-Control: no-cache Postman-Token: 6fb40df7-3a0d-fda6-a94e-63365f594c9d Content

Google Cloud Storage - insufficient permission

折月煮酒 提交于 2021-01-23 06:58:05
问题 The issue seems similar to another post, but It's different for me. Because I check the testIamPermission , and the returns showed that I got all permission I needed and still receive insufficient permission . This is what I received: {'storage.buckets.get' : true} {'storage.buckets.getIamPolicy' : true} {'storage.objects.create' : true} {'storage.objects.delete' : true} {'storage.objects.get' : true} {'storage.objects.getIamPolicy' : true} {'storage.objects.list' : true} {'storage.objects

GCE Windows startup script

ⅰ亾dé卋堺 提交于 2021-01-20 12:28:33
问题 I am facing a strange problem where my windows-startup-script-ps1 is not running at startup as per official link. This corresponds to a PowerShell script as the name indicates. Having looked further into Serial Port logs I found that the error is: The term 'gs://mybucket/metadata.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. I tried giving it

GCE Windows startup script

旧城冷巷雨未停 提交于 2021-01-20 12:26:35
问题 I am facing a strange problem where my windows-startup-script-ps1 is not running at startup as per official link. This corresponds to a PowerShell script as the name indicates. Having looked further into Serial Port logs I found that the error is: The term 'gs://mybucket/metadata.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. I tried giving it

Serving static page from GCS with access restrictions

独自空忆成欢 提交于 2021-01-20 11:35:06
问题 I'm serving a static page on google cloud storage. It works perfectly well, as long as it is public. Now i setted up acl so that only users of one group can read the storage and unauthenticated users get redirected to google authentication. The Problem is now, that the static content of the website, like javascript and css can't be found anymore and i get 404 Errors there. The static content is as well in the storage bucket and it works fine with public urls. When using authenticated urls, it

Serving static page from GCS with access restrictions

我的未来我决定 提交于 2021-01-20 11:34:01
问题 I'm serving a static page on google cloud storage. It works perfectly well, as long as it is public. Now i setted up acl so that only users of one group can read the storage and unauthenticated users get redirected to google authentication. The Problem is now, that the static content of the website, like javascript and css can't be found anymore and i get 404 Errors there. The static content is as well in the storage bucket and it works fine with public urls. When using authenticated urls, it