NS being strange again, apparently it sets the type of the file based on the extension, but only when you upload the file, not when you rename it. So if you have an xml and rename it txt, it will still think it's XML until the next time you change the file.