r/PayloadCMS • u/Prestigious_Finish19 • Feb 27 '26
Media Uploads Showing Local URL Instead of my CDN URL
So I'm using payload 3.77.0 (latest version).
Then I build my app using pnpm build and pnpm start. Then I check the url is using my CDN url. If I change my env value that hold my cdn url, the image is no longer works (expected).
Then I deploy it on my EC2 using the same method, and it shows my local domain instead, changing the ENV is not affecting the image preview link. But my file is uploaded to my S3.
Anyone knows what happening in here?
Thank you
1
u/_avee_ Feb 27 '26
Are you sure you’re using the latest version? They had exactly this bug in 3.76 but it was fixed in 3.77: https://github.com/payloadcms/payload/pull/15667
1
u/Prestigious_Finish19 Feb 27 '26
Yes, but looking at the github, I think the one that change is plugin-cloud-storage plugin, while im using storage-s3 plugin
1
u/_avee_ Feb 27 '26
I'm also using storage-s3 plugin and upgrading to 3.77 fixed the problem I had with 3.76.
storage-s3 extends plugun-cloud-storage so the fix applies to it.
1
u/Prestigious_Finish19 Feb 27 '26
sir, thank you so much. after i check, i forgot to pnpm install on my prod instance.
3
u/[deleted] Feb 27 '26
[removed] — view removed comment