0

我有一个基于 Sencha (1.1) + PhoneGap (2.9) 的应用程序。它通过使用 Ext.Ajax 的 AJAX 调用上传图像,有时可能需要超过 60 秒。在 iOS 上这很好,但在 Android 上,请求在 60 秒后失败,响应为空。调用如下所示:

Ext.Ajax.request({
    url: /* snip */,
    headers: /* snip */,
    xmlData: xml,
    timeout: 180000,
    method: 'POST',
    success: function (response, opts) {
      /* snip */
    },
    failure: function (response, opts) {
      /* snip */
    }
});

我尝试使用 $.ajax 来实现它,结果 iOS 和 Android 都会在 60 秒后超时。如何在 Android 上绕过这个 60 秒的超时?

谢谢,斯图尔特

4

1 回答 1

0

我在某些浏览器中遇到 ajax 请求超时问题,您可以尝试使用文件传输:http: //cordova.apache.org/docs/en/2.9.0/cordova_file_file.md.html#FileTransfer

于 2013-08-22T09:46:34.513 回答