Skip to content

Commit

Permalink
chore: make maxWebImageSize configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Sep 21, 2023
1 parent fbe7f31 commit 7b49144
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/backend/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export type Source = {
abuseDiscordHook: string;
disableAbuseRepository?: boolean;
notificationLimit?: number;
maxWebImageSize?: number;
}
};

Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/DriveService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export class DriveService {
const metadata = await img.metadata();
isAnimated = !!(metadata.pages && metadata.pages > 1);

const maxSize = 8192;
const maxSize = this.config.nirila?.maxWebImageSize ?? 8192;
// nirila Extension: We want to keep original size as possible
// noinspection PointlessBooleanExpressionJS
satisfyWebpublic = !!(
Expand Down

0 comments on commit 7b49144

Please sign in to comment.