From ede772f81e4dd5e96a287e5f31ee7486dc590feb Mon Sep 17 00:00:00 2001 From: mbaharip <62494292+mbahArip@users.noreply.github.com> Date: Wed, 8 May 2024 08:53:12 +0700 Subject: [PATCH] Add `streamMaxSize` to config template --- src/app/[...rest]/deploy/docs.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/app/[...rest]/deploy/docs.tsx b/src/app/[...rest]/deploy/docs.tsx index 465972f..8afd52f 100644 --- a/src/app/[...rest]/deploy/docs.tsx +++ b/src/app/[...rest]/deploy/docs.tsx @@ -412,6 +412,21 @@ const config: z.input = { * Default: true */ proxyThumbnail: ${configuration.api.proxyThumbnail ? "true" : "false"}, + + /** + * Only show preview for files that are smaller than this size + * If the file is larger than this size, it will show "can't preview" message instead + * + * Why? + * Since the stream endpoint are counted as a bandwidth usage + * I want to limit the preview to only small files + * It also to prevent abuse from the user + * + * You can also set this to 0 to disable the limit + * + * Default: 100MB + */ + streamMaxSize: ${100 * 1024 * 1024}, /** * Special file name that will be used for certain purposes