|
|
@@ -13,8 +13,6 @@ const { addSeconds } = require('date-fns');
|
|
|
const ObjectId = mongoose.Schema.Types.ObjectId;
|
|
|
|
|
|
module.exports = function(crowi) {
|
|
|
- const SECONDS_OF_CASH_EXPIRATION = 120;
|
|
|
-
|
|
|
function generateFileHash(fileName) {
|
|
|
const hash = require('crypto').createHash('md5');
|
|
|
hash.update(`${fileName}_${Date.now()}`);
|
|
|
@@ -92,7 +90,5 @@ module.exports = function(crowi) {
|
|
|
return this.save();
|
|
|
};
|
|
|
|
|
|
- attachmentSchema.statics.SECONDS_OF_CASH_EXPIRATION = SECONDS_OF_CASH_EXPIRATION;
|
|
|
-
|
|
|
return mongoose.model('Attachment', attachmentSchema);
|
|
|
};
|