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

贡献一个上传时动态增加表单参数方法 #26

Open
xingzheone opened this issue Jan 3, 2014 · 1 comment
Open

贡献一个上传时动态增加表单参数方法 #26

xingzheone opened this issue Jan 3, 2014 · 1 comment

Comments

@xingzheone
Copy link

很多上传在刚开始的时候不能确定那些参数. 在上传的时候需要动态的添加参数
这里没有修改upload.js的源文件. 只是把 createInputs 提出来使用了下.

.change(function (files) {
                for (var i = 0; i < files.length; i++) {
                    console.log('you are selecting ' + files[i].name + ' Size: ' + files[i].size);
                }
                this.form.append(createInputs({'good':'hahdf'}));
                this.submit()
            }).success(function (response) {
                alert(response);
            });
@lizzie
Copy link
Member

lizzie commented Feb 7, 2014

createInputs 是组件内部方法, 外部调用时调用不到. 你这个是自己实现的么

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