Jcrop在特定服务器上的IE8下失败,在另一台服务器上工作

Jcrop failing under IE8 on specific server, works on another

本文关键字:服务器 工作 一台 IE8 失败 Jcrop      更新时间:2023-09-26

Jcrop在我们的暂存服务器上出现故障,但在生产中运行良好。

两个环境都运行在相同的硬件上,设置了apache虚拟主机。据我们所知,环境是相同的。以下是选择要上传的图片后加载的模式框中的代码。

<?php $jsIncludes = array(
    "jQuery-File-Upload-and-Crop-plugin/js/vendor/jquery.ui.widget",
    "jQuery-File-Upload-and-Crop-plugin/js/jquery.iframe-transport",
    "jQuery-File-Upload-and-Crop-plugin/js/jquery.Jcrop",
    "jQuery-File-Upload-and-Crop-plugin/js/canvas-to-blob.min",
    "jQuery-File-Upload-and-Crop-plugin/js/load-image.min",
    "jQuery-File-Upload-and-Crop-plugin/js/main"
    );
echo $this->html->script($jsIncludes); 
?>
<link rel="stylesheet" href="/js/jQuery-File-Upload-and-Crop-plugin/css/jquery.Jcrop.css" type="text/css" />
<!-- CSS to make adjusments to some layouts of JQ FURAC -->
<link rel="stylesheet" href="/js/jQuery-File-Upload-and-Crop-plugin/css/jquery.furac.ui.css"> 
<style>
.modal-image-scroll {
    height:420px;
    overflow:auto;
    overflow-x:hidden;
}
</style>
<!-- modal-gallery is the modal dialog used for the image gallery -->
<div id="modal-gallery" class="modal modal-gallery hide fade" data-filter=":odd">
    <div class="modal-header">
        <a class="close" data-dismiss="modal">&times;</a>
        <h3 class="modal-title">Image Upload and Crop</h3>
    </div>
    <div class="modal-body"><div class="modal-image"></div></div>
    <div class="modal-footer">
        <form id="opCrop">
<!--            <button class="btn modal-crop" type="button" id="startResize">
                <i class="icon-resize-horizontal"></i>
                Resize to:
            </button> -->
            <a class="btn modal-crop" target="_blank" id="startCrop">
                <i class="icon-th"></i>
                <span>Crop Image to:</span>
            </a>
            <label for="inWidthCrop">Width</label> <input type="number" readonly name="widthCrop" id="inWidthCrop" value="">
            <label for="inHeightCrop">Height</label> <input type="number" readonly name="heightCrop" id="inHeightCrop" value="">
<!--             <button type="reset" class="btn btn-warning cancel">
                    <i class="icon-ban-circle icon-white"></i>
                    Clear
                </button> -->
        </form>
    </div>
</div>
<!-- modal for cropping -->
<div id="croppingModal" class="modal hide">
    <div class="modal-header">
        <button type="button" id="btnCloseCrop" class="close" data-dismiss="modal">×</button>
        <h3>Crop Image <span class="dimentions"></span></h3>
    </div>
    <div class="modal-body">
    </div>
    <br />
    <div class="alert alert-info" style="font-size: 12px; padding: 4px 10px 4px 10px;">
        Click and drag over the area of the phone you'd like to use as your profile picture.
    </div>
    <div class="modal-footer">
        <a href="#" class="btn closeModal" data-dismiss="modal" id="btnCancelCrop">Cancel</a>
        <a href="#" class="btn btn-primary" id="btnDoCrop">Crop</a>
    </div>
</div>

有人知道为什么这可能在一种环境中有效,但在另一种环境下无效吗?

网站正在使用此库:https://github.com/baamenabar/jQuery-File-Upload-and-Crop

在IE8下的暂存环境中,我们最终得到的是一张正确裁剪的图像,但无论源图像如何,它都是黑色的。

这是一个古老的未回答的问题,但如果有人来自谷歌搜索,答案是不用担心IE8。它死了。如果客户需要IE8支持,可以通过向客户显示需要下载现代浏览器的消息来实现。