updates to uuids to be consistent

This commit is contained in:
Devin Zuczek
2026-07-10 00:10:03 -04:00
parent 43c3bd93be
commit 1f70adbd67
7 changed files with 26 additions and 14 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ export const imageRoutes = new Hono<App>({ strict: false })
// The `img` worker serves it back by that key (slashes and all), which is the
// returned ImageName.
const datePrefix = new Date().toISOString().slice(0, 10) + '/'
const name = datePrefix + crypto.randomUUID().replace(/-/g, '') + extension
const name = datePrefix + crypto.randomUUID() + extension
await c.env.IMAGES.put(name, await file.arrayBuffer(), {
httpMetadata: { contentType: file.type || 'image/jpeg' },
})