jQuery File Upload doesn't work in IE9 when compressed with Requirejs

时光毁灭记忆、已成空白 提交于 2019-12-06 10:06:44

Are you requiring the iFrame Transport plugin?

I am using jQuery File Upload with Requirejs, and have not seen this issue. Without seeing some code, it is hard to say what is tripping up your application. I suggest updating your question with some relevant code. In the meantime, here is what is working for me.

main.js

require.config({
    appDir: '../',
    baseUrl: 'js/',
    paths: {
        underscore: '../vendor/lodash.underscore',
        backbone: '../vendor/backbone',
        'jquery.fileupload': '../vendor/jquery-file-upload/js/jquery.fileupload',
        'jquery.iframe-transport': '../vendor/jquery-file-upload/js/jquery.iframe-transport',
        'jquery.ui.widget': '../vendor/jquery-file-upload/js/jquery.ui.widget'
    },
    shim: {
        underscore: {
            exports: '_'
        },
        backbone: {
            deps: ['underscore', 'jquery'],
            exports: 'Backbone'
        }
    }
});

And in the page that houses the upload control:

UploadPage.js

define([
    'views/Base',
    'jquery.iframe-transport',
    'jquery.fileupload'
], function(BaseView) {
    return BaseView.extend({
        // Do cool stuff
    });
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!