Changeset e2c3d09 in Klonkt for src/routes/admin-settings.js
- Timestamp:
- 07/31/2026 12:33:18 PM (6 weeks ago)
- Branches:
- main
- Children:
- 2dd1dc4
- Parents:
- 859b1707
- File:
-
- 1 edited
-
src/routes/admin-settings.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/admin-settings.js
r859b1707 re2c3d09 16 16 import path from 'path'; 17 17 import fs from 'fs'; 18 import { fileURLToPath } from 'url';19 18 import multer from 'multer'; 20 19 import { v4 as uuid } from 'uuid'; … … 26 25 import { entitlementStatus, premiumUnlocked } from '../services/PatreonService.js'; 27 26 import { toWebp } from '../services/ImageWebpService.js'; 27 import { mediaDir } from '../config/paths.js'; 28 28 29 29 const router = express.Router(); … … 36 36 } 37 37 38 const __dirname = path.dirname(fileURLToPath(import.meta.url));39 38 // Hero uploads land in storage/media/hero → accessible as /media/hero/<file> 40 39 // (the /media static handler serves storage/media). Same model as avatars. 41 const HERO_DIR = path.resolve( 42 process.env.HERO_PATH || path.join(__dirname, '..', '..', 'storage', 'media', 'hero') 43 ); 40 const HERO_DIR = mediaDir('HERO_PATH', 'hero'); 44 41 fs.mkdirSync(HERO_DIR, { recursive: true }); 45 42
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)