【问题标题】:opencart 2.2 Resource interpreted as Document but transferred with MIMEopencart 2.2 资源解释为 Document 但使用 MIME 传输
【发布时间】:2017-05-09 02:54:38
【问题描述】:

当我尝试在产品描述中添加图片时,出现以下错误:

“资源解释为文档,但使用 MIME 传输”。

仅当我搜索文件夹中的图像时才会发生这种情况。根目录中的图像正常工作。

当我在某个文件夹中选择图像时,图像会在另一个选项卡中打开,并且不会添加到描述内容中

【问题讨论】:

    标签: javascript php mime-types opencart2.x


    【解决方案1】:

    我发现了问题!修复 /admin/view/javascript/common.js 文件。

    寻找一行 //$ ('# modal-image a.thumbnail'). In ('click', function (e) {

    内部函数

    // Replace the summernotes image manager
    ('Summernote'). Each (function () {
    

    替换

    $ ('# Modal-image a.thumbnail'). On ('click', function (e) {
    E.preventDefault ();
    $ (Element) .summernote ('insertImage', $ (this) .attr ('href'));
    $ ('# Modal-image'). Modal ('hide');
    });
    

    通过

    $ ('# Modal-image'). Delegate ('a.thumbnail', 'click', function (e) {
    E.preventDefault ();
    $ (Element) .summernote ('insertImage', $ (this) .attr ('href'));
    $ ('# Modal-image'). Modal ('hide');
    });
    

    【讨论】:

      猜你喜欢
      • 2017-03-19
      • 1970-01-01
      • 2016-03-30
      • 2013-04-12
      • 2013-05-26
      • 2017-08-01
      • 2011-09-29
      • 2017-05-12
      相关资源
      最近更新 更多