1
0
Fork 0
mirror of synced 2024-07-01 04:21:06 +12:00

Super quick fix for attachments, keeping in correct object store directory.

This commit is contained in:
mike12345567 2021-06-09 17:38:24 +01:00
parent aed973681e
commit 5086a4d0c9
3 changed files with 3 additions and 4 deletions

View file

@ -14,7 +14,6 @@ services:
environment: environment:
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY} MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY} MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
MINIO_BROWSER: "off"
command: server /data command: server /data
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]

View file

@ -71,7 +71,7 @@ exports.uploadFile = async function (ctx) {
return prepareUpload({ return prepareUpload({
file, file,
s3Key: `assets/${ctx.appId}/attachments/${processedFileName}`, s3Key: `/${ctx.appId}/attachments/${processedFileName}`,
bucket: ObjectStoreBuckets.APPS, bucket: ObjectStoreBuckets.APPS,
}) })
}) })

View file

@ -385,7 +385,7 @@ describe("/rows", () => {
name: "test", name: "test",
description: "test", description: "test",
attachment: [{ attachment: [{
key: `${config.getAppId()}/attachment/test/thing.csv`, key: `${config.getAppId()}/attachments/test/thing.csv`,
}], }],
tableId: table._id, tableId: table._id,
}) })
@ -393,7 +393,7 @@ describe("/rows", () => {
await setup.switchToSelfHosted(async () => { await setup.switchToSelfHosted(async () => {
const enriched = await outputProcessing(config.getAppId(), table, [row]) const enriched = await outputProcessing(config.getAppId(), table, [row])
expect(enriched[0].attachment[0].url).toBe( expect(enriched[0].attachment[0].url).toBe(
`/prod-budi-app-assets/${config.getAppId()}/attachment/test/thing.csv` `/prod-budi-app-assets/${config.getAppId()}/attachments/test/thing.csv`
) )
}) })
}) })