Google Storage Image file how to display

  • Goal: Have the downloaded image file present in an Image control

  • Steps: I have a resource setup to be able to download the file from the google storage bucket this is getting the proper data but the format appears to not work for the being able to place into the Image control.

At first I tired using the URL for the image which works only when the user has already accessed the google cloud project and has specific cookie data present in the browser. When the cookie data is not present then using the URL results in no image being present. Since not all of the users would be able to create this cookie dat on their systems. The approach of using the URL fails to work, which our testing team discovered.

Next I created a resource to be able to get the file returned using the resource. Running the resource in preview shows that the proper file is present the item return is of **kind: storage#object. I now need to convert this to a File Object to be able to use the Image Source = JS which requires a FileObject.

  • Details: The code works by loading a table with data and then it uses the name of the bucket file with the resource to access the data using the action Read a File from GCS.

In the preview run of the resource you can see that the proper file has been returned.

I just need some assistance in knowing how to now get the data into a FIle Object that the Image control can display properly. I assume that the creation of the FileObject will be performed in the Transform results.

The Image Source for JS provides an error message for the current setup

  The input must be a file object with the schema
  { name: string, type: 'image/*', sizeBytes: number, base64Data: string }.
  • Screenshots:

Thanks to anyone who is able to help me with this issue I am trying to get around