diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-08-23 16:40:11 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-08-23 16:40:11 +0900 |
| commit | 8032a4e12ad0425b3a2b4d7a857f12de656a718d (patch) | |
| tree | affe3390da6d69d012da6986ab31f917abd68df6 /packages/backend/src/core | |
| parent | add note (diff) | |
| download | sharkey-8032a4e12ad0425b3a2b4d7a857f12de656a718d.tar.gz sharkey-8032a4e12ad0425b3a2b4d7a857f12de656a718d.tar.bz2 sharkey-8032a4e12ad0425b3a2b4d7a857f12de656a718d.zip | |
enhance(frontend): サイズ制限を超過するファイルをアップロードしようとした際にエラーを出すように
Diffstat (limited to 'packages/backend/src/core')
| -rw-r--r-- | packages/backend/src/core/DownloadService.ts | 2 | ||||
| -rw-r--r-- | packages/backend/src/core/entities/MetaEntityService.ts | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/packages/backend/src/core/DownloadService.ts b/packages/backend/src/core/DownloadService.ts index 21ae798f9f..93f4a38246 100644 --- a/packages/backend/src/core/DownloadService.ts +++ b/packages/backend/src/core/DownloadService.ts @@ -42,7 +42,7 @@ export class DownloadService { const timeout = 30 * 1000; const operationTimeout = 60 * 1000; - const maxSize = this.config.maxFileSize ?? 262144000; + const maxSize = this.config.maxFileSize; const urlObj = new URL(url); let filename = urlObj.pathname.split('/').pop() ?? 'untitled'; diff --git a/packages/backend/src/core/entities/MetaEntityService.ts b/packages/backend/src/core/entities/MetaEntityService.ts index 44ec0d6a7b..f4b1e302d0 100644 --- a/packages/backend/src/core/entities/MetaEntityService.ts +++ b/packages/backend/src/core/entities/MetaEntityService.ts @@ -129,6 +129,7 @@ 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, }; return packed; |