From 986bd1ac60235e309dd8ecb97d6ab76df4ba7c56 Mon Sep 17 00:00:00 2001 From: alma Date: Sun, 4 May 2025 16:05:27 +0200 Subject: [PATCH] pages s3 --- lib/s3.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/s3.ts b/lib/s3.ts index c45a6569..1261f18d 100644 --- a/lib/s3.ts +++ b/lib/s3.ts @@ -90,7 +90,10 @@ export async function listUserObjects(userId: string, folder: string) { type: 'file', mime: item.Key?.endsWith('.md') ? 'text/markdown' : 'application/octet-stream', etag: item.ETag - })) || []; + })) + // Filter out placeholder files and empty directory markers + .filter(item => !item.title.startsWith('.placeholder') && item.title !== '') + || []; } catch (error) { console.error('Error listing objects:', error); throw error;