2010-02-19 40 views
1

有問題,當uploadify插件不不超過參數。
嘗試了下面的3個變種。
任何建議或經驗?
Uploadify插件不通過超過1參數

首先 - 標準的方式
解釋portletIdJSESSIONID PARAMS在 '腳本' 通過:

oScript.text = "var $j = jQuery.noConflict();"; 
oScript.text+= "$j(document).ready(function(){"; 
... 
oScript.text+= "$j('#uploadify').uploadify({"; 
oScript.text+= "'script' : '<%= request.getContextPath()%>/uploadFile?portletId=${portletId}&jsessionid=${pageContext.session.id}',"; 
... 

二 - 與 'scriptData'
解釋portletId依然存在,JSESSIONID移到 'scriptData':

oScript.text = "var $j = jQuery.noConflict();"; 
oScript.text+= "$j(document).ready(function(){"; 
... 
oScript.text+= "$j('#uploadify').uploadify({"; 
oScript.text+= "'script' : '<%= request.getContextPath()%>/uploadFile?portletId=${portletId}',"; 
oScript.text+= "'scriptData' : {'jsessionid':'${pageContext.session.id}'},"; 
... 

三 - 與事件ONSELECT的OnOpen
(都嘗試,descriped在Problem sending additional post data to server with uploadify
解釋portletId保持和JSESSIONID設置事件(ONSELECT的OnOpen):

oScript.text = "var $j = jQuery.noConflict();"; 
oScript.text+= "$j(document).ready(function(){"; 
... 
oScript.text+= "$j('#uploadify').uploadify({"; 
oScript.text+= "'script' : '<%= request.getContextPath()%>/uploadFile?portletId=${portletId}',"; 

oScript.text+= "'onOpen' : function(){"; 
oScript.text+= "$j('#uploadify').uploadifySettings("; 
oScript.text+= "'scriptData', {'jsessionid':'${pageContext.session.id}'});}"; 
... 

回答

0

終於解決了。 您應該使用'GET'值作爲'method'參數。 和'scriptData'相對應。

在此處看到詳細信息: uploadify forum post