ladunjexa / nextjs14-notion

Notion is a single space where you can think, write, and plan. Capture thoughts, manage projects, or even run an entire company — and do it exactly the way you want. 📑
https://nextjs14-notion.vercel.app
MIT License
39 stars 13 forks source link

bhai ye cover image kaise kaam kar raha hai batana #1

Open araj59197 opened 7 months ago

araj59197 commented 7 months ago

Screenshot from 2024-01-28 00-46-14 mera nhi aa raha hai

ladunjexa commented 7 months ago

Hi @araj59197 ,

the web application use edgestore to handle file uploads, In our database (convex), for each note we have a field called coverImage that holds the url of the image (that comes from the edgestore storage). Uploading, deleting and updating the image is done by trivial logic, with a little "bonus" that lets you replace an existing file with a new one so that the old file deleted, it's a cool built-in feature of edgestore. take a look at the coverImageModal here.

In addition, we have the drag n' drop feature using react-dropzone. see the implementation of singleImageDropzone here.