skt topu
skt topu

Reputation: 11

How to connect from react to google cloud storage and get private object

I am trying to connect with React to google cloud storage but I can't any suggestions. Basically, I want to view private objects from the bucket in google cloud storage directly from React.JS. Anyone, please help me how I get the private objects in the google cloud bucket from React.JS, Thanks

Upvotes: 0

Views: 1877

Answers (1)

Rajeev Tirumalasetty
Rajeev Tirumalasetty

Reputation: 352

Signed URLs would be the best fitting solution for the problem you are describing, but if it's not an option for other reasons I would say that you will have to create a backend endpoint that retrieves that image impersonating a Service Account which will have an access that does not expire.

In summary, you are going to have to choose were to are going to compromise, either creating extra calls to your backend or extra operations to retrieve new Signed URLs after 7 days.

Upvotes: 1

Related Questions