Explorar o código

BugFix: getFilePathOnStorage of local.js

Yuki Takei %!s(int64=7) %!d(string=hai) anos
pai
achega
0e964ec8ca
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/server/service/file-uploader/local.js

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

@@ -12,7 +12,7 @@ module.exports = function(crowi) {
 
   function getFilePathOnStorage(attachment) {
     if (attachment.filePath != null) {  // remains for backward compatibility for v3.3.5 or below
-      return attachment.filePath;
+      return path.posix.join(basePath, attachment.filePath);
     }
 
     const pageId = attachment.page._id || attachment.page;