Open Abhinandan-Sah opened 6 months ago
hey you got the solution?
yep I have the solution, The problem was the image data is in object form just do image.url instead of image
okay bro, thanks
Also you can define schema of image as follow and you it as usual image:{ filename: { type: String, default: 'listing image' }, url: { type: String, default:"https://www.istockphoto.com/photo/exterior-of-modern-home-gm169821670-26945756?utm_campaign=srp_photos_top&utm_content=https%3A%2F%2Funsplash.com%2Fs%2Fphotos%2Fhome-design-from-outside%3Flicense%3Dfree&utm_medium=affiliate&utm_source=unsplash&utm_term=home+design+from+outside%3A%3Areduced-affiliates%3Aquarter", set: (v) => v === ""?"https://www.istockphoto.com/photo/exterior-of-modern-home-gm169821670-26945756?utm_campaign=srp_photos_top&utm_content=https%3A%2F%2Funsplash.com%2Fs%2Fphotos%2Fhome-design-from-outside%3Flicense%3Dfree&utm_medium=affiliate&utm_source=unsplash&utm_term=home+design+from+outside%3A%3Areduced-affiliates%3Aquarter":v, } }
The image is of object type instead of String type which is creating error. I have create pull request you can refer that in case you are having problem.