Преглед изворни кода

comment out method for deletion attachment file in mongoDB

yusueketk пре 7 година
родитељ
комит
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) {