ソースを参照

Fix: file name length limit mismtach (#7630)

### What problem does this PR solve?

Close #7597

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.19.0
Stephen Hu 5ヶ月前
コミット
2fa8e3309f
コミッターのメールアドレスに関連付けられたアカウントが存在しません
1個のファイルの変更1行の追加1行の削除
  1. 1
    1
      api/db/services/file_service.py

+ 1
- 1
api/db/services/file_service.py ファイルの表示

@@ -432,7 +432,7 @@ class FileService(CommonService):
MAX_FILE_NUM_PER_USER = int(os.environ.get('MAX_FILE_NUM_PER_USER', 0))
if MAX_FILE_NUM_PER_USER > 0 and DocumentService.get_doc_count(kb.tenant_id) >= MAX_FILE_NUM_PER_USER:
raise RuntimeError("Exceed the maximum file number of a free user!")
if len(file.filename) >= 128:
if len(file.filename.encode("utf-8")) >= 128:
raise RuntimeError("Exceed the maximum length of file name!")

filename = duplicate_name(

読み込み中…
キャンセル
保存