Why does XWiki think my text file is a binary file?
What you’re seeing is a “problem” with mime-types. Mime-types are a way to identify what sort of file content is being sent. To do that, the server needs a way of telling what the content is. The way Tomcat does it is to define the mime type based on extensions in a config file called web.xml. Be sure the file has the .txt extension, Then it should be recognized as a text file.