0

So I have a user model in which people can create an account and have an avatar and cover image by default but I'm struggling to set the correct path to those files: enter image description here

and this is the model inside the Models folder:

    avatar: {
      type: String,
      trim: true,
      required: false,
      default: path.resolve(path.resolve(), '', '', 'bf.png')
    },
    cover: {
      type: String,
      trim: true,
      required: false,
      default: path.resolve(path.resolve(), '', '', 'bfcover.gif')
    },
Kirasiris
  • 510
  • 8
  • 33

0 Answers0