Changeset e2c3d09 in Klonkt for src/routes/admin-media.js
- Timestamp:
- 07/31/2026 12:33:18 PM (6 weeks ago)
- Branches:
- main
- Children:
- 2dd1dc4
- Parents:
- 859b1707
- File:
-
- 1 edited
-
src/routes/admin-media.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/admin-media.js
r859b1707 re2c3d09 10 10 import path from 'path'; 11 11 import fs from 'fs'; 12 import { fileURLToPath } from 'url';13 12 import db from '../config/database.js'; 14 13 import { renderPage } from '../middleware/render.js'; 15 14 import { requireGod } from '../middleware/auth.js'; 16 15 import { audioEnabled } from '../config/features.js'; 16 import { mediaDir } from '../config/paths.js'; 17 17 18 const __dirname = path.dirname(fileURLToPath(import.meta.url)); 19 const POST_IMAGES_DIR = path.resolve( 20 process.env.POST_IMAGES_PATH || path.join(__dirname, '..', '..', 'storage', 'media', 'post-images') 21 ); 18 const POST_IMAGES_DIR = mediaDir('POST_IMAGES_PATH', 'post-images'); 22 19 23 20 const router = express.Router(); … … 27 24 // C2S uploads (Shaer's composer and the help buoy) land here; the videos among 28 25 // them are what the Video tab shows. 29 const REPLY_MEDIA_DIR = path.resolve( 30 process.env.REPLY_MEDIA_PATH || path.join(__dirname, '..', '..', 'storage', 'media', 'reply-media') 31 ); 26 const REPLY_MEDIA_DIR = mediaDir('REPLY_MEDIA_PATH', 'reply-media'); 32 27 const isSibling = (f) => /-v\.(mp4|jpg)$/i.test(f); // an animated cover's video/poster sibling 33 28
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)