From 1f33e820d52702dd2c2bbea9c70bc9c15dd9455d Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Fri, 19 Apr 2024 12:28:56 +0200 Subject: [PATCH] fixed GeoportalExporter stream --- .settings/org.eclipse.wst.common.component | 33 ++++++++++--------- .../resolver/services/GeoportalExporter.java | 4 +-- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index da8308c..3b11317 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -1,5 +1,6 @@ - + + @@ -25,7 +26,8 @@ - + + @@ -51,7 +53,8 @@ - + + @@ -77,7 +80,8 @@ - + + @@ -103,7 +107,8 @@ - + + @@ -135,13 +140,8 @@ uses - - uses - - - uses - - + + @@ -167,7 +167,8 @@ - + + @@ -193,7 +194,8 @@ - + + @@ -219,7 +221,8 @@ - + + diff --git a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java index c9799c2..bd9a15c 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java +++ b/src/main/java/org/gcube/datatransfer/resolver/services/GeoportalExporter.java @@ -130,7 +130,7 @@ public class GeoportalExporter { LOG.info("Serving request as client..."); FileReference pdfRef = exportAsPDF(req, ucdID, projectID, null, context, user); - InputStream input = new URL(pdfURL).openStream(); + InputStream input = pdfRef.getStorageVolatileURL().openStream(); StreamingOutput so = new SingleFileStreamingOutput(input); ResponseBuilder response = Response.ok(so) @@ -307,7 +307,7 @@ public class GeoportalExporter { html += "

" + action + "

"; if (waiting) { - html += "\"D4Science
"; + html += "\"D4Science
"; } html += "

" + message + "

";