|
|
@@ -110,10 +110,14 @@ module.exports = function(crowi) {
|
|
|
|
|
|
};
|
|
|
|
|
|
+ lib.deleteFile = async function(attachment) {
|
|
|
+ const filePath = getFilePathOnStorage(attachment);
|
|
|
+ return lib.deleteFileByFilePath(filePath);
|
|
|
+ };
|
|
|
+
|
|
|
lib.deleteFiles = async function(attachments) {
|
|
|
attachments.map((attachment) => {
|
|
|
- const filePath = getFilePathOnStorage(attachment);
|
|
|
- return lib.deleteFileByFilePath(filePath);
|
|
|
+ return lib.deleteFile(attachment);
|
|
|
});
|
|
|
};
|
|
|
|