How to get an image stored on google cloud Platform bucket? - react-native

I want to download the images stored on my Google Cloud bucket and display all the images on my react native app.
I have stored the images on a bucket by encrypting them using my key.
I want to decrypt my images and then display them to the users.
I want the help to react native code to connect with Google Cloud Platform and retrieve my images.

For reading the files from the bucket, you have to set the bucket publicly accessible. Go to Storage, click on the 3 dots on the right of your bucket line, select Edit Bucket Permission. Then, click on Add Member and add allUsers with the role storage object viewer.
Now all your files in the bucket are publicly accessible. The URL of your files will be:
https://storage.googleapis.com/myBucket/path/to/file
Then, decrypt the file on with your key.

Related

How to view the list of files in AWS S3 using Vuejs API?

I upload the files by referring https://www.youtube.com/watch?v=9x5LGaL2W7E.But I don't find any reference videos or links to view the files in the bucket with access key and secret key not with userID and Password. I am specially looking forward to develop this API in Vue.Js(VUE 2)
Navigate me.
You could somehow achieve that but the best solution is probably to use the AWS CLI and run something like s3 ls on your given bucket.
Here is the reference: https://docs.aws.amazon.com/cli/latest/reference/s3/

How can I store Vue assets on google cloud storage?

Is it possible to store Vue.js assets (js and css) on the external storage (google cloud storage)? How can I reference to these files in production mode?
It's indeed possible to host static assets on Cloud Storage. To do so you have to follow the next steps:
Create a bucket
Open the Cloud Storage browser in the Google Cloud Console.
Click Create bucket to open the bucket creation form.
Select the Location type (I recommend leaving it as multi-regional for higher
performance and availability)
Choose Standard as the storage class
Select Uniform as the Access Control
Leave the rest as default and click Create
Upload your assets directory to that bucket
Open the Cloud Storage browser in the Google Cloud Console
In the list of buckets, click on the name of the bucket that you want to upload an object to.
In the Objects tab click the Upload Folder button, select the folder you want to upload in the dialog that appears, and click Open.
Make your assets publicly readable
Select the bucket from the list
Click on the three points setting icon at the right side and select "Edit bucket permissions"
Click on the Add Member button
Type allUsers in the "New members" field and select "Storage Object Viewer" as the Role
Click on the Save button and in Allow Public Access on the popup
Reference the links on your page with the links provided by the bucket
The public URL should be something like: https://storage.googleapis.com/[BUCKET_NAME]/[DIR_NAME]/[OBJECT_NAME]. For example if you bucket is named assets and uploaded a folder named js with a file named main.js your public URL should be something like: https://storage.googleapis.com/assets/js/main.js

Storing a remote hosted image on S3 directly using java sdk

I know I can download the image on server and then upload again to S3 or any other cloud hosting service, but is there any way to store the image asset directly on s3 by supplying URL of asset instead of a file, because I don't want to add unwanted download and upload on my server.
Note: I am assured that the URI will be 99.9% up and image file will also be there. And I am OK to use services other than S3 if they have such a feature.
No. There is no API call for Amazon S3 that will retrieve content from another location.
You must supply the content as part of the API call.

s3 bucket images can access via website only

I am new to S3 , i created a bucket there and uploaded the images.
I want to access that images via my website only. onlybody able to access that bucket.
Please tell me how we can proceed on the same ?

Edit S3 doc with google docs and store it back to S3

I am trying to write a program that would allow my users to edit their S3 docs with Google Docs and then the program would store it back to their S3 bucket.
Any ideas on how to start?
I know its possible to simple open a document with google docs by supplying a URL.
While Google Docs is able to open a document from a URL, it cannot "save" the document back to Amazon S3.
Your users would need to save the document within Google Docs (on Google Drive), then your program would need to retrieve that document and save it into Amazon S3.
The problem is... how do you trigger your program to perform the export?
As an alternative, you could synchronize between Google Drive and Amazon S3. See:
Zapier
CloudHQ
GoodSync
...and probably many more!