diff --git a/Client/WebServer/index.html b/Client/WebServer/index.html index d98447b00..68b4975d4 100644 --- a/Client/WebServer/index.html +++ b/Client/WebServer/index.html @@ -62,7 +62,7 @@ Jeff Braun, rico4dev, 9808us, Barry Low, Nikola Bjelogrlic, Hirajin Koizuko, Francisco J. Santillán, Norman, Viktoria B., Guillermo V., Daniel J., Javier A., Gustavo J., Romina GS, Pedro P., Thais M., Andrey M., Loui M., Natalia M., Bashar A., Carlos V., - Diego M., + Diego M., CarnivalBen, Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Alejandro P., Mateo H., Lan T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B.

With Superalgos Beta 8, contributing is easier than ever! Become a contributor!

diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 11e66375c..8bb2a9f5c 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -1349,7 +1349,12 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE case 'Storage': { - respondWithFile(global.env.PATH_TO_DATA_STORAGE + '/' + httpRequest.url.substring(9), httpResponse) + let pathToFile = httpRequest.url.substring(9) + /* Unsavping # */ + for (let i = 0; i < 10; i++) { + pathToFile = pathToFile.replace('HASHTAG', '#') + } + respondWithFile(global.env.PATH_TO_DATA_STORAGE + '/' + pathToFile, httpResponse) } break diff --git a/README.md b/README.md index b29d41ed5..9438be4f4 100644 --- a/README.md +++ b/README.md @@ -261,7 +261,7 @@ Superalgos is a Community Project built by Contributors for Contributors. Learn ## Top Contributors -Luis Fernando Molina, Julian Molina, Andreja Cobeljic, Matías Benitez, Ira Miller, Eduardo Remis, Jeff Braun, rico4dev, 9808us, Barry Low, Nikola Bjelogrlic, Hirajin Koizuko, Francisco J. Santillán, Norman, Viktoria B., Guillermo V., Daniel J., Javier A., Gustavo J., Romina GS, Pedro P., Thais M., Andrey M., Loui M., Natalia M., Bashar A., Carlos V., Diego M., Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Alejandro P., Mateo H., Lan T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B. +Luis Fernando Molina, Julian Molina, Andreja Cobeljic, Matías Benitez, Ira Miller, Eduardo Remis, Jeff Braun, rico4dev, 9808us, Barry Low, Nikola Bjelogrlic, Hirajin Koizuko, Francisco J. Santillán, Norman, Viktoria B., Guillermo V., Daniel J., Javier A., Gustavo J., Romina GS, Pedro P., Thais M., Andrey M., Loui M., Natalia M., Bashar A., Carlos V., Diego M., CarnivalBen, Sebastian E., Bogdan P., Marko V., Igor S., Niksa K., Rodrigo M., Nicanor M., Alejandro P., Mateo H., Lan T., Leon A., Uroš R., Filip M., Vladimir J. and Pavle B. # License diff --git a/UI/Data-Files/src/FileStorage.js b/UI/Data-Files/src/FileStorage.js index eda906c26..e4f7ae9ea 100644 --- a/UI/Data-Files/src/FileStorage.js +++ b/UI/Data-Files/src/FileStorage.js @@ -2,7 +2,7 @@ function newFileStorage(host, port) { const MODULE_NAME = 'File Storage' const INFO_LOG = false const logger = newWebDebugLog() - + const MAX_RETRY = 2 let currentRetry = 0 @@ -37,13 +37,16 @@ function newFileStorage(host, port) { if (pathComplete === false || pathComplete === undefined) { folder = 'Storage/' } - let url = folder + filePath + let url + if (host !== undefined && port !== undefined) { url = 'http://' + host + ':' + port + '/' + folder + filePath } else { url = folder + filePath } + /* Scaping # since it breaks the URL */ + url = url.replaceAll('#', 'HASHTAG') httpRequest(undefined, url, (response, fileContent) => { if (response.result === GLOBAL.DEFAULT_OK_RESPONSE.result) { callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE, fileContent)