chore: migrate to KT financial system
This commit is contained in:
15
apps/backend/utils/media-storage.ts
Normal file
15
apps/backend/utils/media-storage.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { mkdirSync } from 'node:fs';
|
||||
import { join } from 'pathe';
|
||||
|
||||
const MEDIA_ROOT = join(process.cwd(), 'storage', 'telegram-media');
|
||||
|
||||
mkdirSync(MEDIA_ROOT, { recursive: true });
|
||||
|
||||
export function getMediaRoot() {
|
||||
return MEDIA_ROOT;
|
||||
}
|
||||
|
||||
export function resolveMediaAbsolutePath(relativePath: string) {
|
||||
return join(MEDIA_ROOT, relativePath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user