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

rename deleteFile to deleteFiles

zamis 5 лет назад
Родитель
Сommit
042cfc81dd

+ 1 - 1
src/server/routes/attachment.js

@@ -250,7 +250,7 @@ module.exports = function(crowi, app) {
     // retrieve data from DB to get a completely populated instance
     // retrieve data from DB to get a completely populated instance
     const attachment = await Attachment.findById(attachmentId);
     const attachment = await Attachment.findById(attachmentId);
 
 
-    await fileUploadService.deleteFile(attachment);
+    await fileUploadService.deleteFiles(attachment);
 
 
     return attachment.remove();
     return attachment.remove();
   }
   }

+ 1 - 1
src/server/service/file-uploader/aws.js

@@ -110,7 +110,7 @@ module.exports = function(crowi) {
 
 
   };
   };
 
 
-  lib.deleteFile = async function(attachment) {
+  lib.deleteFiles = async function(attachment) {
     const filePath = getFilePathOnStorage(attachment);
     const filePath = getFilePathOnStorage(attachment);
     return lib.deleteFileByFilePath(filePath);
     return lib.deleteFileByFilePath(filePath);
   };
   };

+ 1 - 1
src/server/service/file-uploader/gcs.js

@@ -87,7 +87,7 @@ module.exports = function(crowi) {
 
 
   };
   };
 
 
-  lib.deleteFile = async function(attachment) {
+  lib.deleteFiles = async function(attachment) {
     const filePath = getFilePathOnStorage(attachment);
     const filePath = getFilePathOnStorage(attachment);
     return lib.deleteFileByFilePath(filePath);
     return lib.deleteFileByFilePath(filePath);
   };
   };

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

@@ -26,7 +26,7 @@ module.exports = function(crowi) {
     return true;
     return true;
   };
   };
 
 
-  lib.deleteFile = async function(attachment) {
+  lib.deleteFiles = async function(attachment) {
     let filenameValue = attachment.fileName;
     let filenameValue = attachment.fileName;
 
 
     if (attachment.filePath != null) { // backward compatibility for v3.3.x or below
     if (attachment.filePath != null) { // backward compatibility for v3.3.x or below

+ 1 - 1
src/server/service/file-uploader/local.js

@@ -30,7 +30,7 @@ module.exports = function(crowi) {
     return true;
     return true;
   };
   };
 
 
-  lib.deleteFile = async function(attachment) {
+  lib.deleteFiles = async function(attachment) {
     const filePath = getFilePathOnStorage(attachment);
     const filePath = getFilePathOnStorage(attachment);
     return lib.deleteFileByFilePath(filePath);
     return lib.deleteFileByFilePath(filePath);
   };
   };

+ 1 - 1
src/server/service/file-uploader/none.js

@@ -9,7 +9,7 @@ module.exports = function(crowi) {
     return false;
     return false;
   };
   };
 
 
-  lib.deleteFile = function(filePath) {
+  lib.deleteFiles = function(filePath) {
     debug(`File deletion: ${filePath}`);
     debug(`File deletion: ${filePath}`);
     throw new Error('not implemented');
     throw new Error('not implemented');
   };
   };