Merge pull request #1684 from Budibase/fix/attachments

Quick attachments fix discovered when investigating the MinIO issue
This commit is contained in:
Michael Drury 2021-06-10 11:43:48 +01:00 committed by GitHub
commit 1be573c0e5
3 changed files with 3 additions and 4 deletions

View File

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

View File

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

View File

@ -385,7 +385,7 @@ describe("/rows", () => {
name: "test",
description: "test",
attachment: [{
key: `${config.getAppId()}/attachment/test/thing.csv`,
key: `${config.getAppId()}/attachments/test/thing.csv`,
}],
tableId: table._id,
})
@ -393,7 +393,7 @@ describe("/rows", () => {
await setup.switchToSelfHosted(async () => {
const enriched = await outputProcessing(config.getAppId(), table, [row])
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`
)
})
})