【问题标题】:Unable to download pdf files bigger than 20mb from parse server无法从解析服务器下载大于 20mb 的 pdf 文件
【发布时间】:2019-10-22 06:46:43
【问题描述】:

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

20mb以上的文件我是通过intent打开的。

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 加载成功以实现快速的互联网连接,但无法加载 1mbps 左右的互联网速度。

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

以下是示例链接:

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

尝试加载 pdf,请告诉我。

【问题讨论】:

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


    【解决方案1】:

    我能够通过我的快速互联网连接下载该文件。您可能是正确的,某些事情正在超时。我们需要更多信息来确定超时发生的位置。

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

    见:https://github.com/parse-community/parse-server#configuring-file-adapters

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-08-04
      相关资源
      最近更新 更多