mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
Add new media handling package
This commit is contained in:
parent
a6c441f665
commit
177f573792
13 changed files with 631 additions and 0 deletions
|
|
@ -101,6 +101,7 @@ export interface ConfigType {
|
|||
convert_images: boolean;
|
||||
convert_to: string;
|
||||
};
|
||||
local_uploads_folder: string;
|
||||
};
|
||||
|
||||
s3: {
|
||||
|
|
@ -234,6 +235,7 @@ export const configDefaults: ConfigType = {
|
|||
convert_images: false,
|
||||
convert_to: "webp",
|
||||
},
|
||||
local_uploads_folder: "uploads",
|
||||
},
|
||||
email: {
|
||||
send_on_report: false,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
import { parse, stringify, type JsonMap } from "@iarna/toml";
|
||||
import type { ConfigType } from "./config-type.type";
|
||||
import { configDefaults } from "./config-type.type";
|
||||
import merge from "merge-deep-ts";
|
||||
|
||||
export class ConfigManager {
|
||||
|
|
@ -116,3 +117,6 @@ export class ConfigManager {
|
|||
return merge(configs) as T;
|
||||
}
|
||||
}
|
||||
|
||||
export type { ConfigType };
|
||||
export const defaultConfig = configDefaults;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue