SWFUpload"addPostParam"不起作用 [英] SWFUpload "addPostParam" doesn't work

查看:116
本文介绍了SWFUpload"addPostParam"不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在测试此上载脚本,它看起来确实不错,但是我无法让它发布我从输入中提取的值.一切看起来都不错,看来我写的都没错,但是它只是停止了SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0, 有一段我的代码会引起这些麻烦

I've been testing this upload script and it looks really good, but i just can't get it to post values, that i have extracted from inputs. Everything is looking good and it seems I'm writing everything correctly but it just stops SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0, there's my piece of code which causes these troubles

.bind('uploadStart', function(event, file){ $(this).addPostParam( "title", "asd"); })

.bind('uploadStart', function(event, file){ $(this).addPostParam( "title", "asd"); })

我将其用作jquery插件,也许是问题所在?谢谢!

I'm using it as jquery plugin, maybe that's the problem? Thanks!

推荐答案

基于项目页面上的文档,您似乎需要使用此代码来获取SWFUpload对象的实例,才能在

Based on the docs on the project page it looks like you will need to use this code to get an instance of the SWFUpload object to call addPostParam on

var swfu = $.swfupload.getInstance('.some-selector-for-your-control');

我认为该事件处理程序中的this引用引用了SWFUpload对象周围的jQuery包装器.

I think the this reference inside of that event handler refers to the jQuery wrapper around the SWFUpload object.

这篇关于SWFUpload"addPostParam"不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆