如何找出用于输入类型=“文件”中接受属性的 .eml 文件的文件格式?
P粉674999420
P粉674999420 2024-03-29 13:07:12
[HTML讨论组]

我正在使用文件输入 html 元素进行文件上传。

<input type="file" name="data[File][0][attachment]" accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf"style="display:inline;width:70%% !important;" class="file-upload" />

我知道这是为了:

  • pdf 为 application/pdf
  • MS Word 是 application/vnd.openxmlformats-officedocument.wordprocessingml.document

我还需要将 .eml 添加到 accept 属性中

如何查找 .eml 文件类型?

我尝试了 application/eml 但没有成功。

P粉674999420
P粉674999420

全部回复(1)
P粉547420474

看起来 .eml 文件没有 mime 类型。此处未列出 http://www.iana.org/assignments/媒体类型/media-types.xhtml

但由于 accept 属性接受 mime 类型和文件扩展名,因此您可以将 .eml 添加到其值中。试试这个

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号