mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
refactor(config): introduce new interface MediaBackendConfig
This interface is needed to help to use types in some cases, where it didn't work before. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
f4a580cf2a
commit
6c82b95ea2
1 changed files with 26 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
@ -10,29 +10,31 @@ import { BackendType } from '../media/backends/backend-type.enum';
|
||||||
import { buildErrorMessage } from './utils';
|
import { buildErrorMessage } from './utils';
|
||||||
|
|
||||||
export interface MediaConfig {
|
export interface MediaConfig {
|
||||||
backend: {
|
backend: MediaBackendConfig;
|
||||||
use: BackendType;
|
}
|
||||||
filesystem: {
|
|
||||||
uploadPath: string;
|
export interface MediaBackendConfig {
|
||||||
};
|
use: BackendType;
|
||||||
s3: {
|
filesystem: {
|
||||||
accessKeyId: string;
|
uploadPath: string;
|
||||||
secretAccessKey: string;
|
};
|
||||||
bucket: string;
|
s3: {
|
||||||
endPoint: string;
|
accessKeyId: string;
|
||||||
};
|
secretAccessKey: string;
|
||||||
azure: {
|
bucket: string;
|
||||||
connectionString: string;
|
endPoint: string;
|
||||||
container: string;
|
};
|
||||||
};
|
azure: {
|
||||||
imgur: {
|
connectionString: string;
|
||||||
clientID: string;
|
container: string;
|
||||||
};
|
};
|
||||||
webdav: {
|
imgur: {
|
||||||
connectionString: string;
|
clientID: string;
|
||||||
uploadDir: string;
|
};
|
||||||
publicUrl: string;
|
webdav: {
|
||||||
};
|
connectionString: string;
|
||||||
|
uploadDir: string;
|
||||||
|
publicUrl: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue