1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-20 14:06:05 +02:00
This commit is contained in:
syuilo
2025-05-14 17:18:39 +09:00
parent e72ce6085a
commit 43a8c3584f
11 changed files with 3 additions and 26 deletions

View File

@@ -80,8 +80,6 @@ type Source = {
allowedPrivateNetworks?: string[];
maxFileSize?: number;
clusterLimit?: number;
id: string;
@@ -152,7 +150,6 @@ export type Config = {
proxySmtp: string | undefined;
proxyBypassHosts: string[] | undefined;
allowedPrivateNetworks: string[] | undefined;
maxFileSize: number;
clusterLimit: number | undefined;
id: string;
outgoingAddress: string | undefined;
@@ -293,7 +290,6 @@ export function loadConfig(): Config {
proxySmtp: config.proxySmtp,
proxyBypassHosts: config.proxyBypassHosts,
allowedPrivateNetworks: config.allowedPrivateNetworks,
maxFileSize: config.maxFileSize ?? 262144000,
clusterLimit: config.clusterLimit,
outgoingAddress: config.outgoingAddress,
outgoingAddressFamily: config.outgoingAddressFamily,

View File

@@ -41,7 +41,7 @@ export class DownloadService {
const timeout = 30 * 1000;
const operationTimeout = 60 * 1000;
const maxSize = this.config.maxFileSize;
const maxSize = 1024 * 1024 * 1024; // 1GB
const urlObj = new URL(url);
let filename = urlObj.pathname.split('/').pop() ?? 'untitled';

View File

@@ -131,7 +131,6 @@ export class MetaEntityService {
mediaProxy: this.config.mediaProxy,
enableUrlPreview: instance.urlPreviewEnabled,
noteSearchableScope: (this.config.meilisearch == null || this.config.meilisearch.scope !== 'local') ? 'global' : 'local',
maxFileSize: this.config.maxFileSize,
federation: this.meta.federation,
};

View File

@@ -293,10 +293,6 @@ export const packedMetaLiteSchema = {
optional: false, nullable: false,
default: 'local',
},
maxFileSize: {
type: 'number',
optional: false, nullable: false,
},
federation: {
type: 'string',
enum: ['all', 'specified', 'none'],

View File

@@ -51,7 +51,6 @@ export class ApiServerService {
fastify.register(multipart, {
limits: {
fileSize: this.config.maxFileSize,
files: 1,
},
});