Uploading Images to GCS

I am trying to upload images to a GCS bucket so I can store the image URLs in a separate database. I think I am uploading the images incorrectly because when I check the GCS bucket i can see the file names uploaded but the content isn't there. Below is the REST API resource I used to upload the images and the error message I received. Thanks!


Screenshot 2024-09-03 at 2.45.07 PM

Hello @Hebron_Daniel!

Sorry to hear you are having these issues. That is very bizarre that you can see the file names but they are missing their content, while Retool is returning a 401 invalid credentials error :thinking:

I would like to know more about your GCS request policy, not super familiar with what settings would need to be set up to allow for Retool requests to go through. Which also depends on if you are self-hosted and can add in your own unique request source vs if you are on cloud and the request comes from the Retool Servers.

But the fact that the file name comes in makes me think the 401 might be a false alarm as odd as that sounds. If the file name is added then the request is being processed to some degree. Are you able to check the server logs on GCS to see if you can view the payload coming in?

There might be more clues into if the auth token is missing or if the server is unhappy about something else coming in. Or if the file format/data type is not being processed but the file title is being parsed out from the payload.

Very tricky :sweat_smile: