API returns bucket url instead of cdn url
rrubio opened this issue · 3 comments
Under development i used the default cloudstorage url -
"baseUrl: 'https://storage.googleapis.com/{bucket-name}'".
Works perfectly, however, i'm ready to go into production now, i've created a load balancer cdn -
"media.mysite.com".
Updating "baseUrl" to "media.mysite.com" does not change the return data "url" containing the original URL (example below) -
https://storage.googleapis.com/my-bucket/my-folder/my-image.jpg
Any help is much appreciated.
Hi @rrubio,
In fact, for each media, the relative url is saved in database, so all "old" files must be renamed manually by updating url
field of media table.
New uploaded files will have the new url name (in theory, this is working for me with Strapi 3).
Thanks
Did you solve this?
@Lith apologies for the late response. The issue for me was related to not using the new "deep" population. I ended up using this plugin - https://market.strapi.io/plugins/strapi-plugin-populate-deep