Bumble
TTCTheo's Typesafe Cult
•Created by j0e on 2/1/2024 in #questions
Compressing images before uploading to UploadThing?
That's true. But if thinking about it, there has to be a tradeoff. In order to implement more features, you have to do more work.
9 replies
TTCTheo's Typesafe Cult
•Created by j0e on 2/1/2024 in #questions
Compressing images before uploading to UploadThing?
You can always do a normal upload using formdata (like in server actions) then upload the file from your server using the server API
9 replies
TTCTheo's Typesafe Cult
•Created by Satou kuzuma on 3/29/2024 in #questions
table schema admins table
I would actually make both. Having a separate table for each role makes it flexible to add more columns to each role individually. Also having one large table means you could share common columns like name, image, etc.
In the end, it depends on your app and what it requires.
3 replies
TTCTheo's Typesafe Cult
•Created by Noor on 3/11/2024 in #questions
Change BG using React State
You should store the state in a global element like the dom or global state so it does not depend on the path.
4 replies
TTCTheo's Typesafe Cult
•Created by tsuki on 3/12/2024 in #questions
Properly setting a minimum delay when fetching data from external api
Adding this, will delay whatever is happening by 150ms.
May I ask why do you want to fetch data more than 10 times a second?
4 replies
TTCTheo's Typesafe Cult
•Created by kirentanna on 3/2/2024 in #questions
Uploadthing uploading directly from express server
Make sure to replace
<binary image>
and <image name>
with the correct values.
Upload thing server api documentation https://docs.uploadthing.com/api-reference/ut-api#utapi3 replies
TTCTheo's Typesafe Cult
•Created by plyglt on 12/25/2022 in #questions
How to handle Failing Unique Constraints?
You can
try/catch
and check for this error (check docs for exact error code) and handle as you want.
The most common approach is to try to read a record from the db with this id. If it returns something, then generate a new one. If it doesn't, you can safely insert it into db.4 replies
TTCTheo's Typesafe Cult
•Created by Huge Letters on 3/8/2024 in #questions
onUploadComplete and onUploadError
I had the same issue a couple of days ago, had to work around it. It'd be nice if they add this feature.
3 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 3/5/2024 in #questions
TRPCClientError: Unexpected token 'A', "An error o"... is not valid JSON
I meant
middleware.ts
at the root of your project. Make sure the request actually gets to your trpc handler. When I got this error, middleware.ts
was redirecting requests to sign in page.10 replies
TTCTheo's Typesafe Cult
•Created by Mocha on 3/5/2024 in #questions
TRPCClientError: Unexpected token 'A', "An error o"... is not valid JSON
maybe it has something to do with your middleware file?
10 replies