Changeset e2c3d09 in Klonkt for src/routes/posts.js
- Timestamp:
- 07/31/2026 12:33:18 PM (6 weeks ago)
- Branches:
- main
- Children:
- 2dd1dc4
- Parents:
- 859b1707
- File:
-
- 1 edited
-
src/routes/posts.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/posts.js
r859b1707 re2c3d09 3 3 import path from 'path'; 4 4 import fs from 'fs'; 5 import { fileURLToPath } from 'url';6 5 import multer from 'multer'; 7 6 import ejs from 'ejs'; … … 25 24 import { verifyBlob } from '../services/CryptoBox.js'; 26 25 import MusicMeta from '../services/MusicMeta.js'; 27 28 const __dirname = path.dirname(fileURLToPath(import.meta.url)); 29 const POST_IMAGES_DIR = path.resolve( 30 process.env.POST_IMAGES_PATH || 31 path.join(__dirname, '..', '..', 'storage', 'media', 'post-images') 32 ); 26 import { mediaDir } from '../config/paths.js'; 27 28 const POST_IMAGES_DIR = mediaDir('POST_IMAGES_PATH', 'post-images'); 33 29 fs.mkdirSync(POST_IMAGES_DIR, { recursive: true }); 34 30 … … 38 34 // Rich replies: media dropped/pasted into the reply editor. Images, audio and 39 35 // video, stored as-is (no transcode; a reply attachment is not a track). 40 const REPLY_MEDIA_DIR = path.resolve( 41 process.env.REPLY_MEDIA_PATH || 42 path.join(__dirname, '..', '..', 'storage', 'media', 'reply-media') 43 ); 36 const REPLY_MEDIA_DIR = mediaDir('REPLY_MEDIA_PATH', 'reply-media'); 44 37 fs.mkdirSync(REPLY_MEDIA_DIR, { recursive: true }); 45 38 const ALLOWED_REPLY_MEDIA_EXT = new Set([
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)