diff --git a/.talismanrc b/.talismanrc index 51a0faafb..8bb801f71 100644 --- a/.talismanrc +++ b/.talismanrc @@ -246,7 +246,7 @@ fileignoreconfig: - filename: packages/migrations/src/migrations/20240710125537_eig.js checksum: c358c5f8cf7a408173e9ff8d273f05c8e1a193c3369ec2389bfd713ff1bab716 - filename: packages/migrations/src/migrations/20240918085236_migrate_files_to_minio.js - checksum: e064a2ee73c2ecb4da219f78c7458302383d264330cc7bf645239519f906f64f + checksum: a6a55d4495524bb170cba9db237704f0a61aacf8425984b614213f535b416c8a - filename: packages/shared/src/components/Chat.vue checksum: f2dbbf72bf098c7abd2c3aee230d220f5a5a106952883c0e116eb49f4f9d4db7 - filename: packages/shared/src/components/PasswordInput.vue diff --git a/packages/migrations/src/migrations/20240918085236_migrate_files_to_minio.js b/packages/migrations/src/migrations/20240918085236_migrate_files_to_minio.js index e94ec8e0b..66c09b835 100644 --- a/packages/migrations/src/migrations/20240918085236_migrate_files_to_minio.js +++ b/packages/migrations/src/migrations/20240918085236_migrate_files_to_minio.js @@ -1,6 +1,7 @@ const { S3Client, PutObjectCommand } = require("@aws-sdk/client-s3"); const S3_BUCKET_NAME = process.env.S3_BUCKET_NAME; +const S3_ROOT_DIR = process.env.S3_ROOT_DIR; const s3Client = new S3Client({ credentials: { @@ -28,7 +29,7 @@ exports.up = (knex) => { new PutObjectCommand({ Body: row.file, Bucket: S3_BUCKET_NAME, - Key: `${row.uuid}.pdf`, + Key: `${S3_ROOT_DIR}/${row.uuid}.pdf`, Metadata: { category: String(row.category), created_at: String(row.created_at),