Changeset e2c3d09 in Klonkt for src/routes/admin-sites.js
- Timestamp:
- 07/31/2026 12:33:18 PM (6 weeks ago)
- Branches:
- main
- Children:
- 2dd1dc4
- Parents:
- 859b1707
- File:
-
- 1 edited
-
src/routes/admin-sites.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/admin-sites.js
r859b1707 re2c3d09 17 17 import path from 'path'; 18 18 import fs from 'fs'; 19 import { fileURLToPath } from 'url';20 19 import multer from 'multer'; 21 20 import { v4 as uuid } from 'uuid'; … … 26 25 import { listPlatforms, PLATFORMS } from '../services/PlatformIcons.js'; 27 26 import { toWebp } from '../services/ImageWebpService.js'; 28 29 const __dirname = path.dirname(fileURLToPath(import.meta.url)); 27 import { mediaDir } from '../config/paths.js'; 28 30 29 31 30 // Profile photos share the avatar directory with user avatars — same physical 32 31 // folder, same URL prefix. Filenames are uuid-prefixed so site photos and 33 32 // user avatars never collide. 34 const PHOTO_DIR = path.resolve( 35 process.env.AVATAR_PATH || path.join(__dirname, '..', '..', 'storage', 'media', 'avatars') 36 ); 33 const PHOTO_DIR = mediaDir('AVATAR_PATH', 'avatars'); 37 34 fs.mkdirSync(PHOTO_DIR, { recursive: true }); 38 35
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)