Debug: list all bucket objects

This commit is contained in:
Manohar Gupta 2026-05-10 14:42:03 +05:30
parent bdd2d3967b
commit 73c3ddb53e

View file

@ -33,11 +33,10 @@ export async function GET(req: NextRequest) {
const { client, bucket, baseUrl } = getR2(); const { client, bucket, baseUrl } = getR2();
const childId = req.nextUrl.searchParams.get("childId") || "default"; const childId = req.nextUrl.searchParams.get("childId") || "default";
// List all memories for this child // List ALL objects in bucket (no prefix filtering for debugging)
const command = new ListObjectsV2Command({ const command = new ListObjectsV2Command({
Bucket: bucket, Bucket: bucket,
Prefix: `memories/${childId}`, MaxKeys: 100
MaxKeys: 50
}); });
const res = await client.send(command); const res = await client.send(command);