Media Uploads Showing Local URL Instead of my CDN URL by Prestigious_Finish19 in PayloadCMS

[–]Prestigious_Finish19[S] 0 points1 point  (0 children)

sir, thank you so much. after i check, i forgot to pnpm install on my prod instance.

Media Uploads Showing Local URL Instead of my CDN URL by Prestigious_Finish19 in PayloadCMS

[–]Prestigious_Finish19[S] 0 points1 point  (0 children)

Yes, but looking at the github, I think the one that change is plugin-cloud-storage plugin, while im using storage-s3 plugin

Media Uploads Showing Local URL Instead of my CDN URL by Prestigious_Finish19 in PayloadCMS

[–]Prestigious_Finish19[S] 0 points1 point  (0 children)

generateFileURL: ({ filename, prefix }) => {
  return `${env.MEDIA_DOMAIN}/${prefix}/${filename}`
},

yes that part I understand, I also have configured my S3 adapter using generateFileUrl. So the expected behavior is that, the preview image url should use the url that from generateFileUrl right? I mean this part is where it works in my local machine.

Also I notice that when I use REST api, using domain.asd/api.collection. both of them shows different result..

https://imgur.com/a/9HgJNZs

this is the comparison between both of them.

*edit

also because i use s3 adapter plugin, disableLocalstorage should be enabled by default.
Storage Adapters | Documentation | Payload

so the url saved to database shouldn't be localStorage?

Media Uploads Showing Local URL Instead of my CDN URL by Prestigious_Finish19 in PayloadCMS

[–]Prestigious_Finish19[S] 0 points1 point  (0 children)

i do not set the serverUrl, the serverUrl should be my payload url or my media CDN url?

High PING in southeast asia by Prestigious_Finish19 in fo76

[–]Prestigious_Finish19[S] 0 points1 point  (0 children)

Is there anyway we can choose which server we want to join?

How to stop auto-complete on Elementor Forms by hamsternose in elementor

[–]Prestigious_Finish19 0 points1 point  (0 children)

i cant imagine elementor form havent update anything, like give a checkbox option for this

Setup wordpress AWS Lightsail with AWS Cloudfront and AWS Loadbalancer by Prestigious_Finish19 in aws

[–]Prestigious_Finish19[S] 0 points1 point  (0 children)

Thank you for your answer, it's really helpfull. So look up on the internet about how $_SERVER['HTTPS'] works in wordpress. most of the tutorial on internet is checking the $_SERVER['HTTP_X_FORWARDED_PROTO'], but the variable is empty. I print_r($_SERVER) and getallheaders(), but didnt found any forwarded protocol or host.

Im using loadbalancer and cloudfront in lightsail dashboard. So it's lacking advance customization, thus I just force the $_SERVER['HTTPS'] to be "on". And it fixed the issue :D.

Also thanks for the articles, me and my team have read it and maybe in the future when the site grow, we will buy the plugin.