mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Merge "Fix media URL generation for non-ASCII filenames"
This commit is contained in:
commit
a3e5b8343a
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ public class Utils {
|
|||
public static String makeThumbBaseUrl(String filename) {
|
||||
String name = filename.replaceFirst("File:", "").replace(" ", "_");
|
||||
String sha = new String(Hex.encodeHex(DigestUtils.md5(name)));
|
||||
return String.format("%s/%s/%s/%s", CommonsApplication.IMAGE_URL_BASE, sha.substring(0, 1), sha.substring(0, 2), name);
|
||||
return String.format("%s/%s/%s/%s", CommonsApplication.IMAGE_URL_BASE, sha.substring(0, 1), sha.substring(0, 2), urlEncode(name));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue