Merge remote-tracking branch 'origin/release/0.19' into feat/advanced-permissions

This commit is contained in:
dswbx
2025-10-03 20:27:07 +02:00
14 changed files with 321 additions and 43 deletions

View File

@@ -22,6 +22,9 @@ declare module "bknd" {
// @todo: current workaround to make it all required
export class AppMedia extends Module<Required<TAppMediaConfig>> {
private _storage?: Storage;
options = {
body_max_size: null as number | null,
};
override async build() {
if (!this.config.enabled) {

View File

@@ -93,7 +93,10 @@ export class MediaController extends Controller {
},
);
const maxSize = this.getStorage().getConfig().body_max_size ?? Number.POSITIVE_INFINITY;
const maxSize =
this.media.options.body_max_size ??
this.getStorage().getConfig().body_max_size ??
Number.POSITIVE_INFINITY;
if (isDebug()) {
hono.post(

View File

@@ -48,7 +48,7 @@ export function buildMediaSchema() {
{
default: {},
},
);
).strict();
}
export const mediaConfigSchema = buildMediaSchema();