mifi/ezshare

Don't trim filename

Closed this issue · 5 comments

It trims the filename down to 100 bytes characters.


UPD:

...while uploading to the server.

mifi commented

are you talking about uploads or downloads?

mifi commented

and how to reproduce exactly?

Upload a file with the follow name:

  • [example] 123456789—2024.03.14—nikita_varb jessica_rabbit who_framed_roger_rabbit 1girl bare_shoulders between_breasts breasts solo—6ae32b1483fc6621dcbbbdb15144885d.jpg

The result is the uploaded file with

  • [example] 123456789—2024.03.14—nikita_varb jessica_rabbit who_framed_roger_rabbit 1girl bare_shoulde

filename.

mifi commented

this is due to https://github.com/sindresorhus/filenamify?tab=readme-ov-file#maxlength

Systems generally allow up to 255 characters, but we default to 100 for usability reasons.

maybe we should increase it to 255, would that be enough?

Yeah.

Also, Node.js internally uses \\?\ prefix, so there is no problem with long path.