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

Revert some migration filename changes.

Thanks to xet7 !
Lauri Ojansivu 2 лет назад
Родитель
Сommit
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;