【发布时间】:2014-04-18 12:33:19
【问题描述】:
我在上传 WMV 和 MPEG 文件时遇到问题,“video/x-ms-wmv”(等)在接受列表中 - 我收到一个错误
上传文件的 MIME 类型或扩展名 服务器不接受 application/octet-stream
使用 Chrome,我检查了标题并显示
内容配置:表单数据;名称="fv_file";文件名="blahblah.wmv" 内容类型:video/x-ms-wmv
客户端计算机也有看起来正确的 WMV 注册表项。
服务器端 Apache 配置为使用操作系统 mime 类型文件:/etc/mime.types。 此文件包含 wmv 和 mpeg 的条目: 视频/x-ms-wmv wmv 视频/mpeg mpeg
CF10 如何确定 mimetype?我正在努力寻找这些信息。 有人有解决办法吗?
谢谢
编辑-添加代码
<cffile action="UPLOAD" filefield="fv_file" destination="#pathtotheserverroot##mediadir#/video/" nameconflict="MAKEUNIQUE" accept="#qry_xxxx.OT_MIMETYPES#" mode="644">
OT_MIMETYPES 的值为
video/mp4,video/mpeg,video/quicktime,video/x-msvideo,video/x-sgi-movie,video/avi,video/vnd.vivo,application/vnd.rn-realmedia,video/vnd .rn-realvideo,audio/vnd.rn-realaudio,audio/x-pn-realaudio,video/x-ms-wmv,audio/mpeg,video/mpg,video/mpe,video/x-ms-asf,video /x-m4v
为了完整性,我做了一个 CFDUMP
Accept video/mp4,video/mpeg,video/quicktime,video/x-msvideo,video/x-sgi-movie,video/avi,video/vnd.vivo,application/vnd.rn-realmedia,video/vnd.rn-realvideo,audio/vnd.rn-realaudio,audio/x-pn-realaudio,video/x-ms-wmv,audio/mpeg,video/mpg,video/mpe,video/x-ms-asf,video/x-m4v
Detail Only files of type video/mp4,video/mpeg,video/quicktime,video/x-msvideo,video/x-sgi-movie,video/avi,video/vnd.vivo,application/vnd.rn-realmedia,video/vnd.rn-realvideo,audio/vnd.rn-realaudio,audio/x-pn-realaudio,video/x-ms-wmv,audio/mpeg,video/mpg,video/mpe,video/x-ms-asf,video/x-m4v can be uploaded. Verify that you are uploading a file of the appropriate type.
Message The MIME type or the Extension of the uploaded file application/octet-stream was not accepted by the server.
MimeType application/octet-stream
【问题讨论】:
-
Adobe 对
<cffile>在 ColdFusion 10 中的工作方式进行了几处更改。您能否附上您的<cffile>代码? -
您可能还想确保您的 mime 类型在您正在使用的服务器中。
-
我已经编辑了原始问题以包含代码 - @Cory Fail,我该去哪里看?这是我最初的问题,CF 从哪里获取信息?如上在Apache中指定的
标签: coldfusion mime-types coldfusion-10