Question

According to the Uploadify documentation, settings can be set using:

$('#file_upload').uploadify('settings','formData', { 'myfield': 'myvalue' });

However, when I use this I get the error Uncaught Call to SetPostParams failed

I have also tried:

$('#file_upload').uploadify('settings','postData', { 'myfield': 'myvalue' });

which interestingly enough, succeeds but does not actually post any data with the upload.

I beleive the OLD way of doing it was:

$('#file_upload').uploadifySettings('formData', { 'myfield': 'myvalue' });

but this call simply throws an error that the object does not have an uploadifySettings method.

Please help!

Was it helpful?

Solution

SOLVED

Firstly, just to confirm that the correct way to do this is:

$('#file_upload').uploadify('settings','formData', { 'myfield': 'myvalue' });

Secondly, the reason it was failing in my case was because the swf object that handles the uploading was in a tab that was not yet visible, thus disconnecting it from the Javascript. For this reason, you can change other settings when its not visible but not formData as that is set directly on the swf object.

I hope this helps someone else as much as it would have helped me! :)

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