标签:pre text 打开方式 联网 类型 互联网 plain 打开 浏览器
mime是一个互联网标准,通过设定它就可以设定文件在浏览器的打开方式。
mime.getType(‘/path/to/file.txt‘); // => ‘text/plain‘ mime.getType(‘file.txt‘); // => ‘text/plain‘ mime.getType(‘.TXT‘); // => ‘text/plain‘ mime.getType(‘htm‘); // => ‘text/html‘
标签:pre text 打开方式 联网 类型 互联网 plain 打开 浏览器
原文地址:https://www.cnblogs.com/Rivend/p/12233240.html