search

Home  >  Q&A  >  body text

node.js - I would like to ask how nodejs stores images in mongodb

The front-end uses vuejs, the back-end uses nodjs, and the database is mongodb. I would like to ask how to implement image uploading? Are images stored in mongodb in base64 format?

大家讲道理大家讲道理2720 days ago890

reply all(4)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-17 09:17:33

    base64 is more convenient

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-17 09:17:33

    Save the picture address. . .

    reply
    0
  • 怪我咯

    怪我咯2017-06-17 09:17:33

    Stored as an accessible address

    reply
    0
  • 代言

    代言2017-06-17 09:17:33

    1. If you want to physically store images, it is best to use base64.
    2. If it is a personal blog and you want to display pictures on the page, then it is best to find an image hosting, upload the pictures, and store the URL of the pictures in your DB

    reply
    0
  • Cancelreply