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
Leonidas2y 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
aditya2y ago
thanks!! as im building just for fun isn't firbase a good option as it supports file upload?
Leonidas
Leonidas2y 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
aditya2y ago
well its not serious so firsbase it is wish i could use trpc and prisma with it lol
Leonidas
Leonidas2y ago
You could definitely use trpc Prisma too when not using firebase‘s noSQL database (fireStore is its name i think)
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
aditya
aditya2y ago
but firestore is not supported in prisma docs how would that work?
Leonidas
Leonidas2y 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
aditya2y ago
okay I'll try it thanks
Want results from more Discord servers?
Add your server