changeset 6118:97d055c24ad4

Fixes bug that caused the garbled upload of user shapefiles (#657).
author Christian Lins <christian.lins@intevation.de>
date Tue, 28 May 2013 13:49:51 +0200
parents 427ef7172476
children 0b9f0d37fe6e
files gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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();
 

http://dive4elements.wald.intevation.org