#Payload Storager s3 adapter - 502 Cloudfront Issue

5 messages · Page 1 of 1 (latest)

shadow skiff
#

Hello ppl, I am using Payload storage s3 adapter with supabase ,
And i'm deploying using SST (OpenNext) and since i'm sticking with server less , i have opted in for client uploads , which enables the process or creation of a signed url and uploading the file directly from the client , instead of routing it via the compulte layer,

The issue is ,when i upload files > 250 MB , The cloudfront throws a 502 , for reference i'll attach the req and response headers of the actual request

fading flaxBOT
shadow skiff
#
POST /api/cms-media?depth=0&fallback-locale=null&locale=en HTTP/2
Host: xx.cloudfront.net
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:141.0) Gecko/20100101 Firefox/141.0
Accept: */*
Accept-Language: en
Accept-Encoding: gzip, deflate, br, zstd
Referer: https://xx.cloudfront.net/admin/collections/cms-media/create
Content-Type: multipart/form-data; boundary=----geckoformboundaryf54ea5b08918cd879d60efe357d158c5
Content-Length: 456
Origin: https://xx.cloudfront.net
Sec-GPC: 1
Connection: keep-alive
Cookie: PARAGLIDE_LOCALE=en; payload-token=[my-token]
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
Priority: u=4
TE: trailers
#
HTTP/2 502 
content-type: application/json
content-length: 21
date: Sun, 03 Aug 2025 07:36:06 GMT
x-amzn-trace-id: Root=1-688f115f-243d3d80419da7e47211845e;Parent=69cf565b4c501efc;Sampled=0;Lineage=1:f11754b1:0
x-amzn-requestid: 75b40e31-8f89-4e48-95d1-276712fcb707
access-control-allow-origin: *
x-cache: Error from cloudfront
via: 1.1 xx.cloudfront.net (CloudFront)
x-amz-cf-pop: MAA51-P1
x-amz-cf-id: cfidxx==
X-Firefox-Spdy: h2
#

This is also stupid from Cloudfront because , it mentions application/json as the response type in the header and just throws a Internal Server Error
text in the response , What is happening here , and i'm sure that the file gets uploaded success fully because when i track the request flow i goes lik

-> Req signed Url - 200
-> Upload Media using Signed Url - 200
-> Try uploading data to payload cms using POST /media -> 502