Tilo
Explore posts from serversCDCloudflare Developers
•Created by Tilo on 2/19/2024 in #pages-help
Sveltekit does not get the platform variable when processing api request
Hello I have a Cloudflare Pages App using Sveltekit and I want to integrate R2.
I have configured my wrangler.toml
I setup my src/app.d.ts:
I'm running the server through this command:
npx wrangler pages dev --proxy 5174 -- npm run dev -- --port 5174
And this is my endpoint
But event.platform is always undefined, no matter how I start the server, even when I deploy a preview build I do not have platform set.
Does anyone have an idea how to fix this, your help would be greatly appreciated.5 replies