mifi / ezshare

Easily share files, folders and clipboard over LAN - Like Google Drive but without internet
MIT License
604 stars 45 forks source link

Don't trim filename #84

Closed AlttiRi closed 6 months ago

AlttiRi commented 6 months ago

It trims the filename down to 100 ~bytes~ characters.


UPD:

...while uploading to the server.

mifi commented 6 months ago

are you talking about uploads or downloads?

mifi commented 6 months ago

and how to reproduce exactly?

AlttiRi commented 6 months ago

Upload a file with the follow name:

The result is the uploaded file with

filename.

mifi commented 6 months ago

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?

AlttiRi commented 6 months ago

Yeah.

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