Kazz
Kazz
Explore posts from servers
BABetter Auth
Created by Kazz on 2/22/2025 in #bug-reports
Organization Plugin: Empty invitation handling
No description
2 replies
TTCTheo's Typesafe Cult
Created by Kazz on 2/21/2025 in #questions
UploadThing file accept type restriction
I solved it by checking the file size in the middleware
pictureRoute: f(['image/jpeg', 'image/png', 'image/avif', 'image/webp'])
.middleware(async ({ files }) => {
if (files[0].size > MAX_SIZE) throw new UploadThingError('FileSizeMismatch')
return {}
})
pictureRoute: f(['image/jpeg', 'image/png', 'image/avif', 'image/webp'])
.middleware(async ({ files }) => {
if (files[0].size > MAX_SIZE) throw new UploadThingError('FileSizeMismatch')
return {}
})
5 replies
TTCTheo's Typesafe Cult
Created by Kazz on 2/21/2025 in #questions
UploadThing file accept type restriction
Thanks that solves it for me. However if I used this I wont be able to set maxFileSize and maxFileCount
profilePicture: f(['image/jpeg', 'image/png', 'image/avif', 'image/webp'])

// I wont be able to set these things now
imageUploader: f({ image: { maxFileSize: '1MB', maxFileCount: 1 } })
profilePicture: f(['image/jpeg', 'image/png', 'image/avif', 'image/webp'])

// I wont be able to set these things now
imageUploader: f({ image: { maxFileSize: '1MB', maxFileCount: 1 } })
5 replies
BABetter Auth
Created by Kazz on 2/3/2025 in #help
Organization haPermission and checkRolePermissions help
Oh my bad, the typescript autocomplete isn't showing it and it wasn't mentioned in the logs so I assumed it only accepted permissions. Thanks for the help! ^
3 replies
BABetter Auth
Created by Kazz on 12/9/2024 in #help
Build error after migrating to React 19 and Next.js 15
Yeah i think it should be included in the middleware part of the documentation for nextjs https://www.better-auth.com/docs/integrations/next#middleware
9 replies