Question

There is issue, when Uploadify plugin desn't POST more than 1 parameter.
Tried 3 variants below.
Any suggestions or experince?

First - standard way
explanation: portletId and jsessionid params passed in 'script' :

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}',"; 
...

Second - with 'scriptData'
explanation: portletId remained, jsessionid moved to '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}'},";
...

Third - with events onSelect and onOpen
(tried both,descriped in Problem sending additional post data to server with uploadify)
explanation: portletId remained and jsessionid is set on event (onSelect or 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}'});}";
...
Was it helpful?

Solution

Finally resolved. You should use 'GET' value as 'method' param mandatory. And 'scriptData' correspondingly.

see details here: uploadify forum post

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top