소스 검색

Revert some migration filename changes.

Thanks to xet7 !
Lauri Ojansivu 2 년 전
부모
커밋
3300bbe9e7
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      server/migrations.js

+ 4 - 2
server/migrations.js

@@ -1254,7 +1254,8 @@ Migrations.add('migrate-attachments-collectionFS-to-ostrioFiles', () => {
     // const filePath = path.join(storagePath, `${fileObj._id}-${newFileName}`);
     // NEW: Save file only with filename of ObjectID, not including filename.
     // Fixes https://github.com/wekan/wekan/issues/4416#issuecomment-1510517168
-    const filePath = path.join(storagePath, `${fileObj._id}`);
+    //const filePath = path.join(storagePath, `${fileObj._id}`);
+    const filePath = path.join(storagePath, `${fileObj._id}-${newFileName}`);
 
     // This is "example" variable, change it to the userId that you might be using.
     const userId = fileObj.userId;
@@ -1326,7 +1327,8 @@ Migrations.add('migrate-avatars-collectionFS-to-ostrioFiles', () => {
     // const filePath = path.join(storagePath, `${fileObj._id}-${newFileName}`);
     // NEW: Save file only with filename of ObjectID, not including filename.
     // Fixes https://github.com/wekan/wekan/issues/4416#issuecomment-1510517168
-    const filePath = path.join(storagePath, `${fileObj._id}`);
+    //const filePath = path.join(storagePath, `${fileObj._id}`);
+    const filePath = path.join(storagePath, `${fileObj._id}-${newFileName}`);
 
     // This is "example" variable, change it to the userId that you might be using.
     const userId = fileObj.userId;