Fixed file URL encoding (#743)

This commit is contained in:
Martijn Brekhof 2020-06-07 10:33:26 +02:00 committed by GitHub
parent 6ed64bf9f9
commit 5c76064bab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ public class FileDownloadHelper {
}
public String getMediaUrl(HostInfo hostInfo) {
String pathforUrl = fileName.replaceAll(" ", "%20").replaceAll("'","%27");
String pathforUrl = Uri.encode(fileName);
String credentials = (hostInfo.getPassword() == null || hostInfo.getPassword().isEmpty()) ? "" :
String.format("%s:%s@", hostInfo.getUsername(), hostInfo.getPassword());
String videoUrl = String.format("http://%s%s:%d/vfs/%s", credentials, hostInfo.getAddress(),