未知的文件类型MIME? [英] Unknown file type MIME?

查看:65
本文介绍了未知的文件类型MIME?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果上传的文件没有扩展名,我是否必须指定MIME类型? 换句话说,是否有默认的常规MIME类型?

Do I have to specify a MIME type if the uploaded file has no extension? In other words is there a default general MIME type?

推荐答案

您可以将application/octet-stream用于未知类型.

You can use application/octet-stream for unknown types.

RFC 2046 状态在第4.5.1节中:

RFC 2046 states in section 4.5.1:

八位字节流"子类型用于 表示一个身体包含 任意二进制数据.

The "octet-stream" subtype is used to indicate that a body contains arbitrary binary data.

这篇关于未知的文件类型MIME?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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