From 10307d60e57a6b79e2820da4cfb95195bf7a55fc Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Sat, 22 Aug 2020 21:58:08 +0200 Subject: [PATCH] Update FileStorage.js --- Files-Component/src/FileStorage.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Files-Component/src/FileStorage.js b/Files-Component/src/FileStorage.js index 937b293c7..113e9f2aa 100644 --- a/Files-Component/src/FileStorage.js +++ b/Files-Component/src/FileStorage.js @@ -27,9 +27,6 @@ function newFileStorage(host, port) { getFileFromHost: getFileFromHost } - if (host === '' || host === undefined) { host = 'localhost' } - if (port === '' || port === undefined) { port = '34248' } - return thisObject async function getFileFromHost(filePath, callBackFunction, pathComplete) { @@ -41,8 +38,10 @@ function newFileStorage(host, port) { folder = 'Storage/' } let url = folder + filePath - if (host !== undefined) { + if (host !== undefined && port !== undefined) { url = 'http://' + host + ':' + port + '/' + folder + filePath + } else { + url = folder + filePath } callServer(undefined, url, (response, fileContent) => {