Update upload filename length limit from 128 to 256, which is aligned with os (#7971)

### What problem does this PR solve?

Change filename length limit from 128 to 256

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2025-05-30 14:25:59 +08:00
committed by GitHub
parent 241fdf266a
commit 31f4d44c73
4 changed files with 5 additions and 4 deletions

View File

@ -47,7 +47,7 @@ def create():
return get_data_error_result(message="Dataset name must be string.")
if dataset_name == "":
return get_data_error_result(message="Dataset name can't be empty.")
if len(dataset_name) >= DATASET_NAME_LIMIT:
if len(dataset_name.encode("utf-8")) >= DATASET_NAME_LIMIT:
return get_data_error_result(
message=f"Dataset name length is {len(dataset_name)} which is large than {DATASET_NAME_LIMIT}")