Fix attachments upload path

This commit is contained in:
Rory Powell 2022-11-01 21:17:39 +00:00
parent e44dd44fad
commit 496ba57655
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ require("svelte/register")
const send = require("koa-send") const send = require("koa-send")
const { resolve, join } = require("../../../utilities/centralPath") const { resolve, join } = require("../../../utilities/centralPath")
const uuid = require("uuid") const uuid = require("uuid")
const { ObjectStoreBuckets, ATTACHMENT_DIR } = require("../../../constants") const { ObjectStoreBuckets } = require("../../../constants")
const { processString } = require("@budibase/string-templates") const { processString } = require("@budibase/string-templates")
const { const {
loadHandlebarsFile, loadHandlebarsFile,
@ -90,7 +90,7 @@ export const uploadFile = async function (ctx: any) {
return prepareUpload({ return prepareUpload({
file, file,
s3Key: `${ctx.appId}/${ATTACHMENT_DIR}/${processedFileName}`, s3Key: `${ctx.appId}/attachments/${processedFileName}`,
bucket: ObjectStoreBuckets.APPS, bucket: ObjectStoreBuckets.APPS,
}) })
}) })