Google Document Viewer shows “No Preview Available”

梦想的初衷 提交于 2019-12-01 16:20:56
larry

Had a file that showed this problem. Renamed it to remove blanks in the file name, updated my link and it worked. Note that blanks were properly HTML encoded as %20 so this 'fix' shouldn't be necessary. But, I can't argue with success. Good luck.

Devilal Tank

Finally solved this issue. Issue is there in url. In url I replaced %2 to %252 then after 1 week I solved this issue.

In short I want to encode query string.

if (Url != null && Url.contains("=")) {
    String Urll =Url.substring(Url.lastIndexOf("&Signature=") + 1).replace("%2B", "%252B");
    if (null != Urll && Urll.length() > 0 && Urll.contains("%252B")) {
        int endIndex = Url.lastIndexOf("Signature");
        if (endIndex != -1) {
            Url = Url.substring(0, endIndex);
            Url = Url + Urll;
        }
    }
    Url = Url.replace("?AWSAccessKeyId=", "?AWSAccessKeyId%3D")
            .replace("&Expires=", "%26Expires%3D").replace("&Signature=", "%26Signature%3D");
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!