How Can I Store Markdown Files Effectively?

0
2
Asked By CuriousCoder42 On

I'm working on a project that features a markdown editor on the frontend, where users can create content with images and code blocks. However, I'm trying to avoid traditional databases for storing this content. What are some methods or services you recommend for storing markdown text along with images and code blocks so that they can be easily accessed and displayed later? Any tips would be greatly appreciated!

4 Answers

Answered By TechSavvy24 On

Based on my experience, if you can, it's usually more practical to use a database for managing markdown files. Dealing with files directly can get messy, especially when your project is already using a database for user accounts and authentication. A good approach might be to store images on an S3 bucket or Minio if you prefer self-hosting, while keeping the actual markdown text in your database.

Answered By MarkdownMaster88 On

Remember, markdown is essentially plain text, including the code blocks. Images are just links as well. You can save the image files (like PNG or JPG) to an S3 server, and then store the markdown files in a document database like MongoDB to avoid cluttering your relational database with large text blocks. This gives you both storage efficiency and retrieval ease!

InsightfulReader22 -

Could you point me to any articles or blogs that discuss efficient storage and fetching methods?

Answered By CuriousCoder42 On
Answered By DevDynamo75 On

I totally agree with using a database for your markdown content along with some file storage for images, like S3. But I'm curious, why avoid putting the text into a relational or other type of database?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.