How to store URL value in Mongoose Schema?
问题 I am uploading the images from an IOS application to Firebase which returns to me the metadata including the URL of type URL . Should I store it of type String in the database like below code? or there is specific type for URL s? var schema = new Schema({ downloadURL: { type: String, createdDate: Date.now } }) 回答1: Well, As per the docs Monngoose doesn't have a schema type for URL. You could just use a string with RegExp to validate it or use some custome made type like this one var mongoose