Uploadify:Dynamic FormData不会更改

Ard*_*eus 8 php upload uploadify

根据当前的uploadify文档,它使用formData(奇怪的是所有谷歌搜索结果,ppl都使用scriptData).问题是我尝试使用setting和onUploadStart事件手动更改formData,因为这个uploadify文档说.但是,文件夹到达服务器时始终保持不变(/ webroot/newsletter).它应该是(/ webroot/newsletter/update),我正在测试这种方式,因为值应该是以后动态的.有什么问题在这里出了什么问题?在uploadify论坛中还有另一个问题,但到目前为止还没有答案

$('#file_upload').uploadify({
                            'method':'POST',
                            'formData' : { 'currentDirPath' : '/webroot/newsletter' } ,
                            'swf'      : '/js/uploadify-v3.1/uploadify.swf',
                            'uploader' : '/js/uploadify-v3.1/uploadify.php',
                            'checkExisting' : '/js/uploadify-v3.1/check-exists.php',
                            'onUploadStart' : function(file) {
                                 $("#file_upload").uploadify('settings', 'currentDirPath', "/webroot/newsletter/update");
                            } ,
                            'onUploadSuccess' : function(file, data, response) {
                                alert('The file was saved to: ' + data);
                            } 
                            // Put your options here
                        });
Run Code Online (Sandbox Code Playgroud)

Ard*_*eus 30

文档错了.它应该是:

 $("#file_upload").uploadify('settings','formData' ,{'currentDirPath': /webroot/newsletter/update});
Run Code Online (Sandbox Code Playgroud)

以防万一有人偶然发现这个问题.干杯.

  • 当我在Chrome中使用它时,我收到错误`Unpaught Call to SetPostParams failed` - 任何想法为什么? (2认同)