Fix the validation issue when the APK file and screenshot names contain spaces

Nipuni Kavindya 1 month ago
parent 5110c241c7
commit 41353e654f

@ -48,6 +48,8 @@ import org.apache.commons.validator.routines.UrlValidator;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import javax.ws.rs.core.Response;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@ -482,7 +484,7 @@ public class APIUtil {
}
private static String encodeURI(String value) {
return value.replace(" ", "%20");
return URLEncoder.encode(value, StandardCharsets.UTF_8);
}
private static final String FILE_NAME_PARAM = "?fileName=";

Loading…
Cancel
Save