1#
我希望能通过file插件向ftp服务器上上传音频文件。但是确实失败的,是不是我配置的参数不对?例如ftp服务器:ftp.solu.com 端口:21 帐号:jiaqi.com 密码 1234
function uploadFile(mediaFile) {
        var ft = new FileTransfer(),
        path = mediaFile.fullPath;
        var options = new FileUploadOptions();
        options.fileKey="file";
        options.fileName=mediaFile.name;
        options.mimeType="text/plain";  
        
        var params = new Object();
        params.value1 = "jiaqi.com";
        params.value2 = "1234";  
        
        options.params = params;  
        ft.upload(path,
                "ftp.solu.com",
                function(result) {
                    console.log('Upload success: ' + result.responseCode);
                    console.log(result.bytesSent + ' bytes sent');
                    alert("成功");
                },
                function(error) {
                    console.log('Error uploading file ' + path + ': ' + error.code);
                    alert("失败");
                },
                options);  
    }
求指教!