Mirobit / Labelit

:book: Anonymize and annotate text
MIT License
7 stars 2 forks source link

Restrict the import function to files of a specified type #12

Closed mrweiler closed 4 years ago

mrweiler commented 4 years ago

When using the import function to import .txt files, every (?) file within the specified directory is imported. Also files of different file types like .csv, .js and .jpg.

Mirobit commented 4 years ago

I assumed that people create a specific folder with only text files. I didn't want to limit the user regarding the file extension or the mime type.

But if there are valid scenarios where people can't be sure about the content of the folder, I will think about limiting file to the text/plain mime type or to the .txt extension.

mrweiler commented 4 years ago

I thought about that one again. I guess I find the label on the drop down menu irritating. It specifically says ".txt files". So my expectation is: import all files with a .txt extension within that directory. In contrast to import all files within that directory as text file.

Mirobit commented 4 years ago

I replaced .txt files with text files. I might add a mime type check later but I am not sure that is necessary. I don't see why there should be non text files in the folder.