【问题标题】:Opencart- Admin-Dowload : not supporting docx and xlsx fileOpencart-Admin-Dowload:不支持 docx 和 xlsx 文件
【发布时间】:2014-01-24 07:06:09
【问题描述】:

目前,我正在开发 Opencart。有一个用于上传文件和链接产品的内置功能。它支持 .pdf、.doc 和 .xls 文件格式。但是,上传 .docx 或 .xlsx 格式文件时出错。

如何修改现有功能。所以,我可以上传那些文件格式。

仅供参考:我使用的是 Opencart 版本 1.5.5.1

谢谢

【问题讨论】:

    标签: file-upload opencart


    【解决方案1】:
    1. 登录管理员
    2. 转到System > Settings
    3. 点击商店的“编辑”按钮。
    4. 选择Server标签。
    5. Allowed File Extensions: 选项中添加所需的文件扩展名。
    6. Allowed File Mime Types:字段中添加对应的mime类型。
    7. 保存。就是这样。

    以下是正确的 mimetypes (What is a correct mime type for docx, pptx etc?):

    .xlsx   application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    .xltx   application/vnd.openxmlformats-officedocument.spreadsheetml.template
    .potx   application/vnd.openxmlformats-officedocument.presentationml.template
    .ppsx   application/vnd.openxmlformats-officedocument.presentationml.slideshow
    .pptx   application/vnd.openxmlformats-officedocument.presentationml.presentation
    .sldx   application/vnd.openxmlformats-officedocument.presentationml.slide
    .docx   application/vnd.openxmlformats-officedocument.wordprocessingml.document
    .dotx   application/vnd.openxmlformats-officedocument.wordprocessingml.template
    .xlam   application/vnd.ms-excel.addin.macroEnabled.12
    .xlsb   application/vnd.ms-excel.sheet.binary.macroEnabled.12
    

    祝你有美好的一天:) !!

    【讨论】:

      猜你喜欢
      • 2021-11-18
      • 2021-03-23
      • 2016-10-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-20
      • 2016-09-06
      • 1970-01-01
      相关资源
      最近更新 更多