فهرست منبع

remover commentout of chunks

zamis 5 سال پیش
والد
کامیت
169187307a
1فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 6 5
      src/server/service/file-uploader/gridfs.js

+ 6 - 5
src/server/service/file-uploader/gridfs.js

@@ -6,7 +6,7 @@ module.exports = function(crowi) {
   const Uploader = require('./uploader');
   const Uploader = require('./uploader');
   const lib = new Uploader(crowi);
   const lib = new Uploader(crowi);
   const COLLECTION_NAME = 'attachmentFiles';
   const COLLECTION_NAME = 'attachmentFiles';
-  // const CHUNK_COLLECTION_NAME = `${COLLECTION_NAME}.chunks`;
+  const CHUNK_COLLECTION_NAME = `${COLLECTION_NAME}.chunks`;
 
 
   // instantiate mongoose-gridfs
   // instantiate mongoose-gridfs
   const { createModel } = require('mongoose-gridfs');
   const { createModel } = require('mongoose-gridfs');
@@ -16,7 +16,7 @@ module.exports = function(crowi) {
     connection: mongoose.connection,
     connection: mongoose.connection,
   });
   });
   // get Collection instance of chunk
   // get Collection instance of chunk
-  // const chunkCollection = mongoose.connection.collection(CHUNK_COLLECTION_NAME);
+  const chunkCollection = mongoose.connection.collection(CHUNK_COLLECTION_NAME);
 
 
   // create promisified method
   // create promisified method
   AttachmentFile.promisifiedWrite = util.promisify(AttachmentFile.write).bind(AttachmentFile);
   AttachmentFile.promisifiedWrite = util.promisify(AttachmentFile.write).bind(AttachmentFile);
@@ -44,9 +44,10 @@ module.exports = function(crowi) {
   };
   };
 
 
   lib.deleteFiles = async function(attachments) {
   lib.deleteFiles = async function(attachments) {
-    attachments.map(async(attachment) => {
-      return lib.deleteFile(attachment);
-    });
+    // attachments.map(async(attachment) => {
+    //   return lib.deleteFile(attachment);
+    // });
+
   };
   };
 
 
   /**
   /**