我应该为 CSV 使用什么 MIME 类型? [英] What MIME type should I use for CSV?

查看:63
本文介绍了我应该为 CSV 使用什么 MIME 类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过使用 application/csvtext/csv.

有区别吗?只要请求与可用的内容相匹配,这是否重要?它们可以互换吗?

Is there a difference? Does it matter which as long as the request matches something that's available? Are they interchangeable?

推荐答案

RFC 7111

有一个 RFC 涵盖它并说使用 text/csv.

此 RFC 更新了 RFC 4180.

This RFC updates RFC 4180.

最近我发现了 Excel 应用程序/vnd.ms-excel 的显式 mimetype.它于 96 年在 IANA 注册.请注意对发件人的怜悯您的机器遭到侵犯的担忧.

Recently I discovered an explicit mimetype for Excel application/vnd.ms-excel. It was registered with IANA in '96. Note the concerns raised about being at the mercy of the sender and having your machine violated.

名称 Microsoft Excel (tm)

Media Type: application/vnd.ms-excel

Name Microsoft Excel (tm)

必填参数:无

可选参数:名称

编码注意事项:首选 base64

Encoding considerations: base64 preferred

安全考虑:与大多数应用程序类型一样,此数据是旨在由理解数据的程序解释收件人的系统.收件人需要了解他们在怜悯"发送方的,当接收到这种类型的数据时,因为数据将在他们的系统上执行,并且他们的安全机器可能会受到侵犯.

Security considerations: As with most application types this data is intended for interpretation by a program that understands the data on the recipient's system. Recipients need to understand that they are at the "mercy" of the sender, when receiving this type of data, since data will be executed on their system, and the security of their machines can be violated.

OID { org-id ms-files(4) ms-excel (3) }

OID { org-id ms-files(4) ms-excel (3) }

对象类型电子表格

评论 此媒体类型/OID 用于标识 MicrosoftExcel 一般(即独立于版本、子类型或平台格式).

Comments This Media Type/OID is used to identify Microsoft Excel generically (i.e., independent of version, subtype, or platform format).

我不知道允许供应商扩展.查看这个答案以了解更多信息- 感谢 starbeamrainbowlabs 的参考.

I wasn't aware that vendor extensions were allowed. Check out this answer to find out more - thanks starbeamrainbowlabs for the reference.

这篇关于我应该为 CSV 使用什么 MIME 类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆