store images on cockroachdb using prisma

how can a user upload images on database? what type should there be in the prisma model
9 Replies
Leonidas
Leonidas3y ago
Its possible to store files in a database, but definitely not recommended S3 is a good and cheap file storage service You could store your files base64 encoded as text in your db - which I do not recommend
aditya
adityaOP3y ago
thanks!! as im building just for fun isn't firbase a good option as it supports file upload?
Leonidas
Leonidas3y ago
Firebase surely has a good dx, but the vendor lockin is very heavy. Therefore i am conflicted to suggest it, but considering your building for fun i can also not shit talk about it For anything serious i cannot recommend it
aditya
adityaOP3y ago
well its not serious so firsbase it is wish i could use trpc and prisma with it lol
Leonidas
Leonidas3y ago
You could definitely use trpc Prisma too when not using firebase‘s noSQL database (fireStore is its name i think)
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
aditya
adityaOP3y ago
but firestore is not supported in prisma docs how would that work?
Leonidas
Leonidas3y ago
Its proprietary tech, it is not supported But no one forces you to use firestore, only because firebase is your hosting provider You could still host a postgreSQL database for an example on railway
aditya
adityaOP3y ago
okay I'll try it thanks
Want results from more Discord servers?
Add your server