无法从解析服务器下载大于20mb的pdf文件

时间:2019-10-22 06:46:43

标签: java android android-studio parse-platform parse-server

我已将PDF文件上传到解析服务器,其中一些文件大小超过20mb。这些文件无法通过Google预览加载,因为我尝试将它们加载到webView中。

20 mb以上的文件是我故意打开的。

if (isLessThan20) {
                myWebView.getSettings().setAppCacheEnabled(true);
                myWebView.loadUrl(Url);
                //url is the *https://docs.google.com/viewer?url= + pdf link*
            } else {
                Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                startActivity(browserIntent);
                //only pdf url
            }

pdf可以成功加载以实现快速的Internet连接,但不能加载1mbps左右的互联网速度。

我认为在成功加载pdf之前解析服务器超时。

以下是示例链接:

  

http://15.206.28.221/parse/files/8e207ab717fc666494e38973c099fa517fc06b54/1cded668b42d8b779803a34498abca7d_a.pdf

尝试加载pdf,请告诉我。

1 个答案:

答案 0 :(得分:0)

我可以通过快速的Internet连接下载文件。您可能是正确的,有些东西正在超时。我们需要更多信息来确定发生超时的地方。

我的建议是不要使用Mongo Gridstore存储大文件。相反,使用AWS S3或Google Cloud Storage均可解决此问题。

请参阅:https://github.com/parse-community/parse-server#configuring-file-adapters