Skip to content

[Bug] [Api] Failed to upload the file because the full name was too long, but get misleading message #9856

@litiliu

Description

@litiliu

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

When the resource's fullname is longer than the max length of the field named "full_name" in t_ds_resources, the insert option will fail. But the misleading message "resource already exists, can't recreate" will be returned, which is not the root cause.

What you expected to happen

Add a validation of name length, before insert record into db.

How to reproduce

Create a folder with a name length of 64, then upload a file with a name length longer than 64 to that folder.

Anything else

It happens every time.

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

backendbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions