private void handleUpload(File file, ChatRoom room, Message.Type type)
{
Log.warning("Uploading file: " + file.getAbsolutePath());
String fileName = null;
try {
fileName = URLEncoder.encode(file.getName(), "UTF-8");
} catch (UnsupportedEncodingException ignored) {
// Can be safely ignored because UTF-8 is always supported
}
try {
//UploadRequest request = new UploadRequest(file.getName(), file.length());
UploadRequest request = new UploadRequest(fileName, file.length());
I have made a pull request based on your suggestion https://github.com/igniterealtime/Spark/pull/423
Will let others to evaluate.
This change has been applied and one can test it in this build https://bamboo.igniterealtime.org/browse/SPARK-NIGHTLY-489/artifact/shared/Install4j-generated-media/ or wait for next day nightly build. Thanks.