I am trying to consume Google Picker API from SAP UI5 application. I need to read the file content as BLOB and convert to Base64 string. I have reached till getting the URL for the file from the response of Google Picker API. However, further to read the BLOB which I can then use to convert it to Base64 string, I need directions. Kindly advise.
Google Picker API documentation referred
The below code helps in getting the metadata of the file:
function pickerCallback(data) {
var url = 'nothing';
if (data[google.picker.Response.ACTION] == google.picker.Action.PICKED) {
var doc = data[google.picker.Response.DOCUMENTS][0];
url = doc[google.picker.Document.URL];
}
var message = 'You picked: ' + url;
document.getElementById('result').innerHTML = message;
}
This helps in obtaining metadata. However I need to read the content of the file. Either as BLOB content or Base64 string.
Samad.