boywonder350
boywonder350
CDCloudflare Developers
Created by boywonder350 on 4/20/2024 in #general-help
“Unique Transformation” - Images
For Image Transformations, how is it determined for a unique transformation? I keep the original image in a non public R2 bucket. So to have a worker do a transformation I will have to sign a url, which means url will be different and I think I would get charged for it multiple times? Unless the image transformation ignores query params on the source image url? Would love clarifaction
3 replies
CDCloudflare Developers
Created by boywonder350 on 11/6/2023 in #workers-help
formData never returns in request
I upload a formData with a file (note it works fine without files) and doing
const formData = await request.formData();
const formData = await request.formData();
it just hangs. I have no idea why. Anyone have any ideas?
25 replies
CDCloudflare Developers
Created by boywonder350 on 9/28/2023 in #workers-help
Pages Functions + D1 Migrations
I currently have a pages project with page functions. My project is set up with src/ containing all of my react code. functions/ containing my workers. And then /db with my Drizzle schema for d1. I do not have a wrangler.toml right now. In my package.json I have a dev script that does the following: wrangler pages dev --d1=TEST_DB --port=8080 --proxy=3000 --compatibility-date=2023-05-18 -- bunx --bun vite It works great. My question is how to do I apply migrations. I created a d1 database through the dashboard but I have not created a table. I wrote a schema and ran migrations via: bunx drizzle-kit generate:sqlite --schema=./db/schema/index.ts --out=./migration and got a sql file. I am not sure how to push the migration to the database in d1. Do I need to set up a wrangler.toml? I am confused about the wrangler.toml part because I do not see it mentioned in the page functions doc. Any help would be greatly appreciated. Thank you!
3 replies
CDCloudflare Developers
Created by boywonder350 on 9/25/2023 in #workers-help
React + Vite + Page Functions
How do I get the ability to use vite along with page functions locally with wrangler? Currently I am running this script: "wrangler pages dev --port=8080 --proxy=3000 --compatibility-date=2023-05-18 -- bunx --bun vite" and the vite server boots up and I can access localhost:3000 fine. But when I try to do a get request for localhost:3000/api/create-checkout-session I just get an empty page and not my api. Not sure how to configure it so the function is served correctly. Any ideas would be super helpful!
13 replies
CDCloudflare Developers
Created by boywonder350 on 7/13/2023 in #pages-help
rate limit pages functions?
How do I set up rate limiting for a pages function? I tried setting up a rate limit rule for my domain -> waf -> rate limits, but it is not working. Appreciate any and all help!
1 replies