'Is there a way to store image from the google storage buckets as JPEG locally?
So currently I have images stored in gcp storage.
When I fetch an image, I receive a File object with several parameters. Being one of them mediaLink
with a format like https://storage.googleapis.com/download/storage/{path}%{image_name}?generation={value}&alt=media
The problem is that this url is only accessasble with permission, I want to be able to save the image as a JPEG so I can later send it to the user via email.
Is there any way this can be achieved?
Thank you in advance.
Solution 1:[1]
To grant access to a object on Cloud Storage for an user without change the bucket to public or require user authentication you may use Signed URLs. With a Signed URl you will be able to share a temporary link to get or upload a file.
More info about here
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Eumagnun |