ADD: API_URL to env
ADD: DocumentUrls and mainImageUrls field in belonging model FIX: Indexing bugs for belonging ADD: getImage endpoint to get private images ADD: PrivateUrl field as virtual FIX: Minor bug in bucketDeleteFile service ADD: Word type to multer file checker
This commit is contained in:
@@ -28,5 +28,9 @@ fileSchema.virtual('publicUrl').get(function () {
|
||||
return this.fileEndpoint + '/' + this.bucketName + '/' + this.fileName
|
||||
})
|
||||
|
||||
fileSchema.virtual('privateUrl').get(function () {
|
||||
return process.env.API_URL + '/api/files/get-image/' + this.bucketName + '/' + this.fileName
|
||||
})
|
||||
|
||||
const File = mongoose.model('file', fileSchema)
|
||||
module.exports = File
|
||||
|
||||
Reference in New Issue
Block a user