1

I'm creatinga n app using Ember.js and Ineed to upload files in my app for that I've to use uplodify.js I know how to use uplodify.js in the traditional way but the problem is how can i use the uplodify.js in a app constructed by Ember.js. my current code is given below I know its not correct

Wizard = Em.Application.create({
    ready: function () {
        $('#logoUpload').uploadify({
            'swf': '/Assets/Uplodify/uploadify.swf',
            'uploader': 'Business/FileUpload',
            'buttonText': 'Upload new photo',
            'cancelImg': '/Assets/Uplodify/cancel.png'
        });
    }
});
4

1 回答 1

1

您在呈现任何内容之前进行此调用,因此如果 #logoUpload 不直接在页面上,则选择器将失败。您应该创建一个上传视图,然后在视图的 didInsertElement 函数中调用此代码。

于 2013-06-07T17:56:09.480 回答