From 31a28af4138dfd7e04403bf5fa7a68d619d823f4 Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Thu, 21 Sep 2023 22:04:26 -0400 Subject: [PATCH] fix painting `profile` queries --- system/netlify/functions/media-collection.js | 3 +++ system/public/aesthetic.computer/disks/profile.mjs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/system/netlify/functions/media-collection.js b/system/netlify/functions/media-collection.js index 69dc9afe66..62b01e9172 100644 --- a/system/netlify/functions/media-collection.js +++ b/system/netlify/functions/media-collection.js @@ -28,6 +28,9 @@ export async function handler(event, context) { let files; try { + // TODO: Resort zip/png files / sort files by extension by making new + // directories in the buckets and migrating everything. + // https://chat.openai.com/c/c77b1bca-223b-49ec-bf93-f64bf7cccf05 const data = await client.s3.send(new ListObjectsV2Command(params)); const splitPath = path.split("/"); // Chop up the path. const id = await getHandleOrEmail(splitPath[0]); // Get human readable id. diff --git a/system/public/aesthetic.computer/disks/profile.mjs b/system/public/aesthetic.computer/disks/profile.mjs index 6a2e132edb..94a52e7824 100644 --- a/system/public/aesthetic.computer/disks/profile.mjs +++ b/system/public/aesthetic.computer/disks/profile.mjs @@ -85,7 +85,8 @@ async function boot({ params, user, handle, debug, hud, net, get }) { const lastPaintingCode = lastPainting .split("/") .pop() - .replace(".png", ""); + .replace(".png", "") + .replace(".zip", ""); // Strip either extension off after fetching. // net.preload(lastPainting).then((img) => (painting = img)); // This doesn't work because of CORS errors in the Cloudflare worker. return get.painting(lastPaintingCode).by(visiting); -- knotmirror 0.0.1