diff --git a/backend/src/routes/events.ts b/backend/src/routes/events.ts index 4db201a..6cdb352 100644 --- a/backend/src/routes/events.ts +++ b/backend/src/routes/events.ts @@ -94,7 +94,7 @@ const eventsRoute: FastifyPluginAsync = async (fastify) => { // Prepare directories - use persistent volume for Fly.io const dataDir = process.env.GIT_WORKSPACE_DIR || path.join(process.cwd(), 'data'); - const uploadDir = path.join(dataDir, 'images', 'events'); + const uploadDir = path.join(dataDir, 'public', 'images', 'events'); if (!fs.existsSync(uploadDir)) fs.mkdirSync(uploadDir, { recursive: true }); // Read uploaded stream into buffer @@ -133,7 +133,7 @@ const eventsRoute: FastifyPluginAsync = async (fastify) => { fs.writeFileSync(destPath, outBuffer); // Public URL (served via /static) - const publicUrl = `/static/images/events/${filename}`; + const publicUrl = `/images/events/${filename}`; return reply.code(201).send({ imageUrl: publicUrl }); diff --git a/backend/src/routes/gallery.ts b/backend/src/routes/gallery.ts index 4279c84..e6695af 100644 --- a/backend/src/routes/gallery.ts +++ b/backend/src/routes/gallery.ts @@ -86,7 +86,7 @@ const galleryRoute: FastifyPluginAsync = async (fastify) => { // Prepare directories - use persistent volume for Fly.io const dataDir = process.env.GIT_WORKSPACE_DIR || path.join(process.cwd(), 'data'); - const uploadDir = path.join(dataDir, 'images', 'gallery'); + const uploadDir = path.join(dataDir, 'public', 'images', 'gallery'); if (!fs.existsSync(uploadDir)) fs.mkdirSync(uploadDir, { recursive: true }); // Read uploaded stream into buffer @@ -125,7 +125,7 @@ const galleryRoute: FastifyPluginAsync = async (fastify) => { fs.writeFileSync(destPath, outBuffer); // Public URL (served via /static) - const publicUrl = `/static/images/gallery/${filename}`; + const publicUrl = `/images/gallery/${filename}`; // Store in DB (optional but useful) const [row] = await db.insert(galleryImages).values({ diff --git a/images/events/miyuej5d-w2s9tn.jpeg b/images/events/miyuej5d-w2s9tn.jpeg deleted file mode 100644 index 2a8e88c..0000000 Binary files a/images/events/miyuej5d-w2s9tn.jpeg and /dev/null differ diff --git a/images/gallery/miyrhqng-i2kgtx.webp b/images/gallery/miyrhqng-i2kgtx.webp deleted file mode 100644 index a394d50..0000000 Binary files a/images/gallery/miyrhqng-i2kgtx.webp and /dev/null differ diff --git a/images/gallery/miyu98xy-24n3xo.png b/images/gallery/miyu98xy-24n3xo.png deleted file mode 100644 index fc3a111..0000000 Binary files a/images/gallery/miyu98xy-24n3xo.png and /dev/null differ diff --git a/images/gallery/miyu9ex6-6imbgc.png b/images/gallery/miyu9ex6-6imbgc.png deleted file mode 100644 index 2b546c4..0000000 Binary files a/images/gallery/miyu9ex6-6imbgc.png and /dev/null differ diff --git a/images/gallery/miyu9s7x-8nsszm.png b/images/gallery/miyu9s7x-8nsszm.png deleted file mode 100644 index 802ae5f..0000000 Binary files a/images/gallery/miyu9s7x-8nsszm.png and /dev/null differ diff --git a/images/gallery/miyu9vl2-pndg1t.png b/images/gallery/miyu9vl2-pndg1t.png deleted file mode 100644 index 494ffa6..0000000 Binary files a/images/gallery/miyu9vl2-pndg1t.png and /dev/null differ diff --git a/images/gallery/miyu9za8-edtk3k.png b/images/gallery/miyu9za8-edtk3k.png deleted file mode 100644 index 0f12971..0000000 Binary files a/images/gallery/miyu9za8-edtk3k.png and /dev/null differ diff --git a/images/gallery/miyupfov-hkjb08.png b/images/gallery/miyupfov-hkjb08.png deleted file mode 100644 index fc3a111..0000000 Binary files a/images/gallery/miyupfov-hkjb08.png and /dev/null differ diff --git a/images/gallery/miyuxizd-77on2t.webp b/images/gallery/miyuxizd-77on2t.webp deleted file mode 100644 index 25a1d14..0000000 Binary files a/images/gallery/miyuxizd-77on2t.webp and /dev/null differ