Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

R2 Presigned URL : No upload limit ???!!!

Hey everyone, I'm using presigned URLs to allow users to upload files directly to my R2 bucket, and I noticed that AWS S3 allows setting a content-length-range condition to restrict file size. However, I couldn't find any way to enforce a max file size limit in R2's presigned URLs. Does this mean that anyone with the URL could upload huge files (even terabytes) to my bucket????!!! If so, what's the best way to prevent this? Any official way to enforce size limits at the R2 level?...

Expected latency difference between workers.dev and custom domain

I have a very simple /ping worker. I get ~85ms for a round trip to workers.dev, and ~50ms for a round trip to my custom domain. In general, is this expected, and if so, does anybody know the underlying reason why there's such a big difference?

How can I increase the number of custom domains supported by workers/pages?

I have a SaaS and my clients' customers can add a custom domain. Workers/pages support up to 100 custom domains. Is there any way to increase this limit?...

Uploading worker module with the TS SDK

Is there a code snippet or something for creating a worker with the TS SDK? https://developers.cloudflare.com/api/node/resources/workers/subresources/scripts/methods/update/ I think im struggling to read the doc so i think a code snippet would help me figure out how to use it. I've got an implementation with just fetch() but i'd much prefer the type safety of the sdk when possible. ...

Wrangler hangs on "Shutting down remote preview..."

Wrangler 3.109.2, after pressing X while running a Worker locally with --remote. Known issue? I can CTRL+C out of it fine, seemingly without consequence, but X just hangs with the above message.

D1 ERROR: Currently processing a long-running export

I tried exporting my remote database but there was a virtual table in it, which resulted in an error. My database is not answering since then, its been hours already! The D1 UI dashboard is not loading at all, my database id is 8df0deb7-8642-454b-a1f9-6aae3c64c542...

KV store in NextJs App

I have a nextjs app that is a worker (following this guide). I also have a binding for KV ready (as seen in the pic). How can I use the kv binding to replace redis here? ```Typescript import { FrameNotificationDetails } from "@farcaster/frame-sdk"; import { Redis } from "@upstash/redis"; ...
No description

AI Worker form Workflow throws Network connection lost Name: AiError

Simple calls to other models work, but I am trying to process an uploaded video from R2 and hit this error. Code for workflow ```ts...
No description

durable objects: browser rendering + sqlite?

hey guys, I'd like to use browser rendering and sqlite in a durable object. is this possible? when i run wrangler dev without --remote, i get an error saying browser rendering isn't available without --remote but if I do run it with --remote, then I get an error saying sqlite is only available in local mode...

env.production.vars not working with cloudflare workers

This is my wrangler file: ```toml name = "post-crawl-workers" main = "dist/index.js" compatibility_date = "2025-02-28"...

Placement inside worker

Is it possible to get the placement inside of a worker (for analytics reasons)? It seems like colo is the closest DC to the user, not the actual placement (when using smart placement).

Support for Speaker Diarization on Cloudflare Workers AI

Hi everyone, Iā€™m currently using Cloudflare Workers AI for speech-to-text transcription with Whisper-large-v3-turbo, and it works great. However, I also need speaker diarization to differentiate between multiple speakers in an audio file. Right now, the best open-source option is Pyannote, but it requires a GPU and seems too heavy to run on Cloudflare Workers due to resource limits....

Build errors with too many files building in a pnpm monorepo project

How to resolve this error? Can I pass a custom install command with lower concurrency? Using github integration and workers!

Sequelize on Cloudflare Workers is indefinitely hanging

Sequelize seems to indefinitely hang on Cloudflare Workers with no error messages. Does anyone know if there is a workaround or if it's just not compatible? I've already set the following in my wrangler.toml ``` compatibility_flags = [ "nodejs_compat" ]...

Browser Rendering API doesn't show much of the Stripe header

I've been having a play around with the Browser Rendering API to see what it's capable of, but ran into this issue. The Stripe website is showing up as per the attached image. Minimum reproducible example:...
No description

Fetch to Google APIs timeout in prod

Im getting some strange behaviour in prod when my worker's fetch to googleapis is hanging / timing out. When I run request via curl with the same params, the request succeeds. Am I missing something obvious? Im not using the google node library, Im just making a standard HTTP request. Everything works ok in dev so Im trying to figure out what about the prod worker doesnt work right....

Worker and Google Ai FileManager Problem

Hi everyone! I'm trying to use the File API with Gemini in a Cloudflare Worker environment, but I'm running into an issue. According to the documentation, we can use the File API to handle files up to 2GB (instead of the 20MB limit with inline data). However, the GoogleAIFileManager.uploadFile() method seems to only accept a file path string and uses fs.readFileSync internally, which isn't available in Cloudflare Workers. Is there any way to use the File API with an ArrayBuffer or a URL directly? My use case is:...

Workers transiently dropping REQUEST BODY sending empty body to ORIGIN Server.

We are using CF workers to chnange the hostname and direct to different origion servers based on some URL paths and query parameters. However we have seen less 1% 524 errors. COreeposnding CF RAY ids were not present in origin server. In order to understand the pattern and started to log both request and response contents. However ever since we did, we started getting calls from customers they are are saying invalidation errors(422), that is due to request content being empty. I am suspecting...

env. return undefined in tests

I'm experiencing an issue with environment variables in Cloudflare Workers tests. When running tests using the Vitest configuration, all environment variables accessed through the env object are returning undefined (happens only on cloudfare deployment, locally its as expected) ``` import { env, createExecutionContext } from 'cloudflare:test'; ...

How to reduces rows_read when create table virtual FTS5 in d1 database when use order

when i use order in query from FTS5 table rows_read is has use b-tree for order by how to use index for order by and ignore b-tree for order by...
Next