Using uploadthing with mongodb

Is it possible to upload it to uploadthing, then store the url in mongodb? I am using NextJS and NextAuth. I am trying to let users upload their own private images that no one but them can see, and I'm not sure how to do so with uploadthing.
2 Replies
Neto
Neto12mo ago
use uploadthing, and handle the file url at the callback api route if you want to store the url on mongodb, do it
rainy
rainy12mo ago
sorry, im not understanding. Im pretty new to this, could you show me an exaple code block?
Want results from more Discord servers?
Add your server
More Posts
How to handle getSession delay on client components with NextAuth?Hey all. So with next auth, there seems to be a delay every time the getSession hook is used to mak[SOLVED] Next.js App Router with Express Custom ServerHi Theo, I watched your YouTube video on App Router Review six months in, great video, thanks for poDisable some eslint rules this in extend pluginsHello ! I have this eslint config : ```ts // eslint-disable-next-line @typescript-eslint/no-var-Do I belong here?Is this Discord server for members of a TypeScript course? Or is it for anyone interested in TypescrProtect routes? For the app itself, no user auth, pages router. Help, desperate.Hi, I'm a noob and I've been winging it with Chat GPT My app is ready, Im using next js 13, now I TypeError: Cannot read properties of undefined (reading 'subscribe')Hi, I have the following code and I keep getting the error "Cannot read properties of undefined (reatRPC query gets the type right on the way in and wrong on the way out?This is a weird one. I have a public procedure (query) that takes a string as an input. Part of the Why does the official Twitter website look so different on mobile?So I recently completed theo's Twitter clone tutorial and wanted to go a bit further make the projecRequest and update as the server comes alongSo, I have a scenario in which I have a list of currencies, like `["USD", "EUR", "BRL"]` etc, that hCan't resolve 'fs' but in an API route???Any idea why this error is occuring? I thought all api routes are node compatible... ``` Module not