diff --git a/src/app.ts b/src/app.ts index c60c4839..382d039a 100644 --- a/src/app.ts +++ b/src/app.ts @@ -17,7 +17,7 @@ const build = (opts: buildOpts = {}): FastifyInstance => { const app = fastify(opts) app.register(fastifyMultipart, { limits: { - fields: 0, + fields: 10, fileSize: 50 * 1024 * 1024, files: 1, }, diff --git a/src/routes/object/createObject.ts b/src/routes/object/createObject.ts index 34fa415e..502e4dcd 100644 --- a/src/routes/object/createObject.ts +++ b/src/routes/object/createObject.ts @@ -50,7 +50,7 @@ export default async function routes(fastify: FastifyInstance) { // https://github.com/fastify/fastify-multipart/issues/162 /* @ts-expect-error: https://github.com/aws/aws-sdk-js-v3/issues/2085 */ const cacheTime = data.fields.cacheControl?.value - const cacheControl: string = `max-age=${cacheTime}` ?? 'no-cache' + const cacheControl: string = cacheTime ? `max-age=${cacheTime}` : 'no-cache' const { bucketName } = request.params const objectName = request.params['*'] diff --git a/src/utils/index.ts b/src/utils/index.ts index 6649db54..17f7ec6d 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -9,7 +9,6 @@ interface jwtInterface { } export function getPostgrestClient(jwt: string): PostgrestClient { - // @todo in kps, can we just ping localhost? const postgrest = new PostgrestClient(postgrestURL, { headers: { apiKey: anonKey,