SWFUpload “addPostParam” doesn't work

拟墨画扇 提交于 2020-02-06 09:08:45

问题


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"); })

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


回答1:


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');

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



来源:https://stackoverflow.com/questions/2796322/swfupload-addpostparam-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!