Leonardo Vannucci
2018-08-06 2e41678d03a4fd4c79173651a546c3e0c4fb0148
dg1cloud-core/src/main/java/it/digione/dg1cloud/service/Utils.java
....@@ -6,6 +6,7 @@
66 import java.net.URL;
77
88 import org.apache.commons.io.FileUtils;
9
+import org.apache.logging.log4j.util.Strings;
910 import org.slf4j.Logger;
1011 import org.slf4j.LoggerFactory;
1112 import org.springframework.beans.factory.annotation.Autowired;
....@@ -29,6 +30,9 @@
2930 uriBuilder.path("/downloadFile");
3031 uriBuilder.queryParam("fileName", regDocument.getFileName());
3132 uriBuilder.queryParam("id", regDocument.getDocumentId());
33
+ if ( Strings.isEmpty(regDocument.getSecretKey()) == false ) {
34
+ uriBuilder.queryParam("secretKey", regDocument.getSecretKey());
35
+ }
3236 return uriBuilder.build().toURL();
3337 }
3438