[Dive4elements-commits] [PATCH] Fixes bug that caused the garbled upload of user shapefiles (#657)
Wald Commits
scm-commit at wald.intevation.org
Tue May 28 13:49:54 CEST 2013
# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1369741791 -7200
# Node ID 97d055c24ad48ee7f8ccda3162bab661424fcf10
# Parent 427ef71724766b49dd09bdc6318a8728d36cf27d
Fixes bug that caused the garbled upload of user shapefiles (#657).
diff -r 427ef7172476 -r 97d055c24ad4 gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java Tue May 28 13:04:13 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java Tue May 28 13:49:51 2013 +0200
@@ -99,10 +99,12 @@
out.write(buffer, 0, len);
cnt += len;
}
- logger.debug("FileUploadServiceImpl.createFileXML(): " + cnt + " bytes file to be uploaded");
- buffer = Base64.encodeBase64(buffer);
+ buffer = Base64.encodeBase64(out.toByteArray());
String b64File = new String(buffer);
+ logger.debug("FileUploadServiceImpl.createFileXML(): " + cnt
+ + "/" + b64File.length()
+ + " bytes (orig/base64) file to be uploaded");
Document fileDoc = XMLUtils.newDocument();
More information about the Dive4elements-commits
mailing list