AnsweredAssumed Answered

GET request on base64 Alfresco

Question asked by pat9rv3sousa on Nov 4, 2015
Latest reply on Nov 5, 2015 by pat9rv3sousa
I'm trying to make a file request with this:


var connector = remote.connect("alfresco");
result = connector.get(PATH TO THE FILE);
    if (result.status == 200)
    {
        var data = result;
    }


And I get the all content of PDF in binary format. I want to convert to base64 but I want that the server make this before return the response. Anyone know how to make this?

I accept other type of resolutions without being with connector but XMLHttpRequest or Alfresco. or YAHOO.util.Connect.asyncRequest('GET,url,callback) don't works in server javascript, are undefined, so, I only know this resolution to get content.

Outcomes