Cory
Cory
Explore posts from servers
CDCloudflare Developers
Created by Cory on 10/23/2024 in #workers-help
Is there any way to have getPlatformProxy access remote data?
I want to use getPlatformProxy create a remote proxy so it uses actual data from my cf account instead of just mimmicking locally. Is it possible to do this?
1 replies
CDCloudflare Developers
Created by Cory on 10/19/2024 in #workers-help
Is it possible to use the Rate Limit API within an app created with Astro?
I am trying to use the new beta rate limit API in my application that is created using Astro. I understand how the runtime api and context works - but it seems to fail when trying to use the new Rate Limit API. Is there an example of this somewhere, or is it not possible?
1 replies
CDCloudflare Developers
Created by Cory on 4/12/2024 in #pages-help
How to enable unsafe binding in config
I am getting this error: Configuration file for Pages projects does not support "unsafe"
5 replies
CDCloudflare Developers
Created by Cory on 4/10/2024 in #pages-help
Support for separate wrangler.toml files in monorepo?
When using the new wrangler.toml support with Pages and new mono-repo support, Cloudflare seems to only look for the wrangler.toml file at the root directory (even if root directory is manually changed). I would like to have a seperate wrangler.toml for each Pages project within my mono-repo.
6 replies
CDCloudflare Developers
Created by Cory on 4/10/2024 in #general-help
How do I use multiple wrangler.toml with different projects in a mono-repo?
When I have my wrangler.toml in the directory of my app aka... apps/site/wrangler.toml It does not seem to know it's there. Putting it in the root directory of the project works - but I want to have seperate wrangler tomls for different projects - how can I do this?
10 replies
DTDrizzle Team
Created by Cory on 2/27/2024 in #help
isNotNull() returning incorrect Type
The following code...
export const getItemsInTrash = db
.select()
.from(schema.item)
.where(and(eq(schema.item.id, sql.placeholder('id')), isNotNull(schema.item.trashedAt)))
.orderBy(desc(schema.item.updatedAt))
.prepare();
export const getItemsInTrash = db
.select()
.from(schema.item)
.where(and(eq(schema.item.id, sql.placeholder('id')), isNotNull(schema.item.trashedAt)))
.orderBy(desc(schema.item.updatedAt))
.prepare();
Returns an array of objects where "trashedAt" is a Date | Null but this is not possible because I am using where isNotNull()
1 replies
CDCloudflare Developers
Created by Cory on 2/12/2024 in #workers-help
When running fetch to transform an image, it ignoring the "format" but only within my code
If I navigate to the URL directly, it formats it to webp, but if I use 'fetch' from within my sveltekit function, it doesn't convert it - is there a reason for this?
6 replies
DTDrizzle Team
Created by Cory on 2/8/2024 in #help
If I pass an object with a property that has 'undefined' as the value, will it be ignored?
If I am updating or inserting data and passing an object, for instance:
const dbData = {
id: undefined,
name: 'foo'
}
const dbData = {
id: undefined,
name: 'foo'
}
Will ID be ignored and not set?
3 replies
CDCloudflare Developers
Created by Cory on 2/1/2024 in #workers-help
Not image transforms not support transforming a AVIF image as the source?
Wondering whether I should accept AVIF image files, but it seems like it's not supported when trying to transform it
3 replies
CDCloudflare Developers
Created by Cory on 1/25/2024 in #general-help
Why does "service bindings" link go to D1 page
No description
1 replies
CDCloudflare Developers
Created by Cory on 12/12/2023 in #general-help
Can't access worker "route" from inside SvelteKit worker function
I have a worker that uploads images to R2, and I call it via a fetch via an API route in my SvelteKit application. I have a custom "route" assigned to it, that is in the same zone as the SvelteKit application (hosted on Cloudflare). It only works when I fetch the original URL .workers.dev, and not the custom one I have set up which is essentially site.com/image-upload/* even though if I go tot he URL via the browser, it works fine. is there a solution i ammissing here?
4 replies
DTDrizzle Team
Created by Cory on 10/20/2023 in #help
How to select all from a table and get the the columns names returned as they are stored?
I want to do a select() query on my user table to get emailVerified: boolean('email_verified').default(false).notNull(), What is returning is emailVerified as opposed to email_verified. I want to return the latter, but also all the rest of the columns. I know I could do this:
.select({
id: user.id,
email: user.email,
email_verified: user.emailVerified
})
.select({
id: user.id,
email: user.email,
email_verified: user.emailVerified
})
But then if I add anything to the user table, I now have to add it to the select statement, where I might forget. Is there a way to say get ALL columns but return email_verified as actually email_verified? Or return all columns with their actual column names, as opposed to the Drizzle version?
6 replies
CDCloudflare Developers
Created by Cory on 10/11/2023 in #workers-help
How to enable logpush with Cloudflare and SvelteKit?
Is there someway with the Cloudflare adapter with SvelteKit to enable logpush?
11 replies
DTDrizzle Team
Created by Cory on 9/6/2023 in #help
How to updateNow for datetime?
How can I automatically update a datetime when the row is updated for mySQL?
4 replies
DTDrizzle Team
Created by Cory on 7/30/2023 in #help
Is there a way to easily convert existing schema's to different DB type?
I have a mySQL schema currently, but wanted to try out libSQL via Turso, but didn't want to have go through my entire schema and queries and change them all manually. Is there some easier way to do this?
1 replies
CDCloudflare Developers
Created by Cory on 7/27/2023 in #general-help
Any particular reason my image-resized would have have no age ?
Using the image-resizer via URL and getting blank for the age
1 replies
DTDrizzle Team
Created by Cory on 7/27/2023 in #help
Difference in using unique() on the column definition vs the index?
What is the different between using something like name: varchar('name', { length: 256 }).unique() vs (t) => ({ unq: unique().on(t.name), }));)
4 replies
CDCloudflare Developers
Created by Cory on 7/26/2023 in #general-help
Why is cloudflare image res-sizing not being properly cached?
I was recently using Cloudflare image re-sizing and using a non-origin s3 link for the resize targets. I then got a cname for the s3 bucket and used a cname record so the images are not run through cloudflare. It stil seems the images are not being cached long enough
4 replies
DTDrizzle Team
Created by Cory on 6/30/2023 in #help
It is possible to have prepared statements inside transactions?
Is there a way to insert prepared queries inside a transaction ?
2 replies
DTDrizzle Team
Created by Cory on 6/20/2023 in #help
Is there a way to save the generated response Type from a query?
I see that when you hover over the type for the response of a query, you can see what data will be returned. Is there a way to extract, or save that Type somehow, so I can use it elsewhere?
16 replies