upload a file using Cloudflare Pages and SvelteKit
Hello,
I'm attempting to upload a file using Cloudflare Pages and SvelteKit. Below is the code snippet:
This code works locally, but on the production environment (Cloudflare Pages), the image is not an instance of File.
3 Replies
nvm, i found the solution in the docs:
https://developers.cloudflare.com/workers/configuration/compatibility-dates/#formdata-parsing-supports-file
Cloudflare Docs
Compatibility dates · Cloudflare Workers docs
Opt into a specific version of the Workers runtime for your Workers project.
@Evil Morty Did this actually solve the problem for you? I'm still running into the issue of the
File
being converted into a string. In my case it's a PNGyes it did, show me your .toml file