ImagePlus icon indicating copy to clipboard operation
ImagePlus copied to clipboard

AWS Sources

Open matdave opened this issue 2 years ago • 4 comments

I've added a trim statement to the URL to help with external image sources. These return with the base URL prepended when grabbed from the media browser.

matdave avatar Oct 24 '23 16:10 matdave

Thank you! Since I can't test this here, I'll have to rely on your suggestion. Does this touch any other media source types?

Jako avatar Nov 02 '23 13:11 Jako

I don't think that the regex is right in your patch. It trims multiple baseUrls on the left from the src. This is maybe right, if the baseUrl value of the mediasource contains only a slash, but not if it contains i.e. slashes and a cultureKey.

Can you give an example for the input and the result? Is it ok to trim only a single value?

Jako avatar Feb 21 '24 09:02 Jako

It may be wrong. It's just what I threw on a site to make it work :rofl:. Example on the site was the src returns https://s3.site.com/path/to/image.jpg. and it was outputting https://s3.site.com/https://s3.site.com/path/to/image.jpg with ImagePlus

matdave avatar Feb 22 '24 20:02 matdave

I had a similar issue on the new BannerX fork, and solved it on the PHP side here:

3.x https://github.com/matdave/BannerRevised/blob/c8ff8dd032d69ffd478990b5b07fd10b676236fd/core/components/bannerrevised/src/Model/Ad.php#L28 2.x https://github.com/matdave/BannerRevised/blob/c8ff8dd032d69ffd478990b5b07fd10b676236fd/core/components/bannerrevised/model/bannerrevised/brevad.class.php#L5

matdave avatar Feb 22 '24 20:02 matdave