Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

上传文件控件如果携带form其他字段信息,uploadAll()不能改变formdata #25

Open
jacobdong opened this issue Jun 21, 2014 · 1 comment

Comments

@jacobdong
Copy link

file-upload控件作者提供解决方案
解决方案

vm.uploader = $fileUploader.create({
        scope: $scope,
        url: '../rest/news',
        //autoUpload: true,   // 自动开始上传
        autoUpload: false,   // 自动开始上传
        formData: [
        ],
        filters: [           // 过滤器,可以对每个文件进行处理
            function (item) {
                console.info('filter1', item);
                return true;
            }
        ]
    });

    vm.uploader.bind('beforeupload', function (event, item) {
        item.formData.push({title: vm.news.title});
        item.formData.push({content: vm.news.content});
        item.formData.push({intro: vm.news.intro});
    });
@why520crazy
Copy link
Member

@asnowwolf 你看看,如果不能解决在 showcase案例上说明一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants