First Batch of changes to support Minio together with Azure as File Providers

This commit is contained in:
Luis Fernando Molina committed 2019-04-06 16:28:01 +02:00
1 parent 7270a52590
commit 32d4444782
11 files changed
+599 -132

No files matched your search

+36
View File
@@ -136,3 +136,39 @@ function callServer(pContentToSend, pPath, callBackFunction) {
}
}
}
function getBlobToText(pContainerName, pPath, callBackFunction) {
let xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function () {
if (this.readyState === 4 && this.status === 200) {
let response = JSON.parse(xhttp.responseText);
callBackFunction(response.err, response.text, "");
}
};
try {
let request = {
conatinerName: pContainerName,
path: pPath
};
request = JSON.stringify(request);
let path = "FileService";
let blob = new Blob([request], { type: 'text/plain' });
xhttp.open("POST", path, true);
xhttp.send(blob);
} catch (err) {
if (ERROR_LOG === true) { console.log(spacePad(MODULE_NAME, 50) + " : " + "[ERROR] getBlobToText -> err.message = " & err.message); }
}
}