Просмотр исходного кода

comment out method for deletion attachment file in mongoDB

yusueketk 7 лет назад
Родитель
Сommit
11cd6d6166
1 измененных файлов с 9 добавлено и 9 удалено
  1. 9 9
      src/server/service/file-uploader/gridfs.js

+ 9 - 9
src/server/service/file-uploader/gridfs.js

@@ -19,15 +19,15 @@ module.exports = function(crowi) {
   // obtain a model
   AttachmentFile = gridfs.model;
 
-  // delete a file
-  lib.deleteFile = async function(fileId, filePath) {
-    debug('File deletion: ' + fileId);
-    await AttachmentFile.unlinkById(fileId, function(error, unlinkedAttachment) {
-      if (error) {
-        throw new Error(error);
-      }
-    });
-  };
+  // // delete a file
+  // lib.deleteFile = async function(fileId, filePath) {
+  //   debug('File deletion: ' + fileId);
+  //   await AttachmentFile.unlinkById(fileId, function(error, unlinkedAttachment) {
+  //     if (error) {
+  //       throw new Error(error);
+  //     }
+  //   });
+  // };
 
   // create or save a file
   lib.uploadFile = async function(filePath, contentType, fileStream, options) {