Facing "ENAMETOOLONG: name too long" error

System Information
  • Strapi Version: 4.1.12
  • Operating System: MacOS
  • Database: Postgres
  • Node Version: 16.15.1
  • NPM Version: 8.11.0
  • Yarn Version: 1.22.11

When I try to upload a file with long name then I’m getting below error:

 error: ENAMETOOLONG: name too long

File name: Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book here a.pdf

Can someone help me with the root cause of this error?

Thank you.

Going to guess that the max is about 255 or 250 depending if it’s text or string.
I’m going to guess that a string has less then 250 characters. And due that it’s to long it will throw that error.

Why would you use that long of a name anyways.

Thank you so much Eventyret for providing insightful information.

There is no specific reason for that but client faced this issue with long name and raised bug over the internal platform. I did some research on the same but didn’t find any suitable solution. And then after I raised question in strapi forum.