diff options
-rw-r--r-- | server/models/Product.js | 2 | ||||
-rw-r--r-- | server/uploads/no-image.png | bin | 0 -> 25570 bytes |
2 files changed, 1 insertions, 1 deletions
diff --git a/server/models/Product.js b/server/models/Product.js index f825a8b..a8ef10e 100644 --- a/server/models/Product.js +++ b/server/models/Product.js @@ -12,7 +12,7 @@ const ProductSchema = new mongoose.Schema({ }, imagePath: { type: String, - required: false, + default: "uploads/no-image.png", maxLength: [256, "Product's image path can't have more then 256 characters."] }, price: { diff --git a/server/uploads/no-image.png b/server/uploads/no-image.png Binary files differnew file mode 100644 index 0000000..4c91643 --- /dev/null +++ b/server/uploads/no-image.png |