mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Trim accidentally added space at the end of filename (#2967)
* Fixes #2917: App adds space at end of filename sometimes * Fix #2917: Trims accidental space at the end of the filename
This commit is contained in:
parent
4896e5992e
commit
d782d3eacc
1 changed files with 3 additions and 1 deletions
|
|
@ -815,7 +815,9 @@ public class ApacheHttpClientMediaWikiApi implements MediaWikiApi {
|
|||
return new UploadResult(resultStatus, errorCode);
|
||||
} else {
|
||||
Date dateUploaded = parseMWDate(result.getString("/api/upload/imageinfo/@timestamp"));
|
||||
String canonicalFilename = "File:" + result.getString("/api/upload/@filename").replace("_", " "); // Title vs Filename
|
||||
String canonicalFilename = "File:" + result.getString("/api/upload/@filename")
|
||||
.replace("_", " ")
|
||||
.trim(); // Title vs Filename
|
||||
String imageUrl = result.getString("/api/upload/imageinfo/@url");
|
||||
return new UploadResult(resultStatus, dateUploaded, canonicalFilename, imageUrl);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue