diff --git a/src/main/java/org/gcube/dataanalysis/executor/util/StorageUtils.java b/src/main/java/org/gcube/dataanalysis/executor/util/StorageUtils.java index e661d9b..06fb621 100644 --- a/src/main/java/org/gcube/dataanalysis/executor/util/StorageUtils.java +++ b/src/main/java/org/gcube/dataanalysis/executor/util/StorageUtils.java @@ -25,12 +25,17 @@ import org.gcube.dataanalysis.ecoengine.configuration.AlgorithmConfiguration; public class StorageUtils { public static void downloadInputFile(String fileurl, String destinationFile) throws Exception{ + downloadInputFile(fileurl, destinationFile, false); + } + + public static void downloadInputFile(String fileurl, String destinationFile, boolean httpURL) throws Exception{ try { - Handler.activateProtocol(); + if (!httpURL) + Handler.activateProtocol(); URL smpFile = new URL(fileurl); URLConnection uc = (URLConnection) smpFile.openConnection(); InputStream is = uc.getInputStream(); - AnalysisLogger.getLogger().debug("GenericWorker-> Retrieving from " + fileurl + " to :" + destinationFile); + AnalysisLogger.getLogger().debug("Retrieving from " + fileurl + " to: " + destinationFile); inputStreamToFile(is, destinationFile); is.close(); } catch (Exception e) {