Forum Academy Marketplace Showcase Pricing Features

Getting image url from image picker

This is for a slack notification so I need to be able to get the URL.

Currently trying this combination:
Screen Shot 2020-07-03 at 10.57.09 am

And this is what the looks like in file navigator:

The view button links to the amazon s3 URL… I’ve tried multiple different chains to try and get that link to go into my slack notification field to display that image but can’t work it out.

If you were able to print that URL out in a text element, you’d see the problem. The S3 URL is not fully qualified – that is, it’s missing the https: part. They begin with //, not https://.

(I guess there’s a reason for this, which is that Bubble assumes you’re only going to use such URLs in the link element or something, but it’s not documented as to what exactly is returned as URL by :saved to S3. Personally, I think this is a bug and/or a really stupid choice and I’ve complained about it before to no effect… so whatevs, right? :man_shrugging: I feel this is especially stupid as there is only one protocol supported by S3 - https: - and so why would you ever return this URL without the protocol?!??!??)

So what you need to do is include the protocol part as a literal in front of that expression. Kind of like this:

Literally insert, by typing, the characters https: in front of your expression.

1 Like

Thanks @keith , That worked. Just to close off the thread in case anyone is looking for the exact chain of variables it was this: Screen Shot 2020-07-03 at 11.49.50 am

1 Like

Thanks for the information on this as it’s an issue I’ve just encountered.

Works fine for single images where I can update an additional field in my database but doesn’t work for add List :frowning:

You physically cannot add the https: to the beginning of the variable.

1 Like

Hey I found a method for fixing this. Bonus side is you don’t have to do anything extra when the images are first uploaded (like save proper URLs somewhere else). Just use the following formula whenever you need to use the images URL.

Select the images > 'S URL > :find&replace > Find: //, Replace: https://

1 Like