fohrloop / dash-uploader

The alternative upload component for python Dash applications.
MIT License
141 stars 29 forks source link

problem with long file names #142

Open tbonewmy opened 2 weeks ago

tbonewmy commented 2 weeks ago

Hi there, I encountered a problem when uploading file that has long file name. My file name has 64 characters. Let's simplify it as file name long_name. I also tried to make it shorter with 12 characters. let's call it short_name.

When I upload the short_name.csv. Every thing is fine. The progress bar push to the end. A new file is created in the {destination folder name}/{uuid code}/short_name.csv When I upload long_name.csv. First the progress bar stuck at 0%. With the bar stuck, a new folder and file were still created. However, the created directory is {destination folder name}/{uuid code}/long_namecsv/.lock_1. Notice it got one extra folder level long_namecsv which is just the file name without the .. Then the end file .lock_1 has a weird name. Also .lock_1's size is 0 bytes.

Is the acceptable file name constrained somehow?

fohrloop commented 2 weeks ago

I can't recall if there's any name length constraints, but have you checked if the OS has maximum length for the file names? Iirc Windows by default limits file names to ~256 characters.