@samitouri / QOSami-HFS / commits / e2234972

avoid storing empty username in upload meta

Massimo Melina committed Sep 17, 2023 at 09:48 UTC e2234972fcaa73c6a0e879a16901dcc9fba725b1
1 file changed +1 -1
src/upload.ts
+1 -1
@@ -30,7 +30,7 @@ export function getUploadMeta(path: string) {
30
31 function setUploadMeta(path: string, ctx: Koa.Context) {
32 return storeFileAttr(path, ATTR_UPLOADER, {
33 - username: getCurrentUsername(ctx),
33 + username: getCurrentUsername(ctx) || undefined,
34 ip: ctx.ip,
35 })
36 }