When I download a text file with extension .mac (or any extension but .txt) the file downloads but the extension .txt is added to file name. How do I prevent this from happening?


You can only in general prevent this if you control the server.

I assume you're talking about downloading using a browser - in which case the web server controls the file type and naming using the Content-Type MIME indication as well as the Content-Disposition header for specifying the file name.

  • Yes. Sorry I wasn't clear on this. I'm using my stand-alone iMac. I open a web page in Safari and download some files onto my hard drive. – jmh Jul 29 '17 at 20:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .