Problem downloading stored html file

Hello! I’m having a problem downloading files uploaded on my system, specifically, html files. When my system is used on desktop, everything works fine, but on mobile, the .html files always come as .html.txt; which is creating problems for users to actually open them. Can someone enlighten me on how to solve this issue?