function dbox_cat_file(path, callback)
{
    var xhr = new XMLHttpRequest();
    xhr.open('POST', 'https://content.dropboxapi.com/2/files/download', true);
    xhr.setRequestHeader('Authorization', 'Bearer ' + dbox_key_value);
    xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({"path":path}));

    xhr.onreadystatechange = function ()
    {
        if (xhr.readyState == 4)
        {
            if(xhr.status == 200)
            {
                callback(xhr.responseText);
            }
            else
            {
                callback(null);
                
            }
        }
    }

    xhr.send();
}
// depends on the folder already having been ls'd into not_file_ls element. We check to see if files exists before performing the cat
depends on the folder already having been ls'd into not_file_ls element. We check to see if files exists before performing the cat
depends on the folder already having been ls ' d into not_file_ls element . We check to see if files exists before performing the cat
function dbox_cat_file(path, callback)
{
    var xhr = new XMLHttpRequest();
    xhr.open('POST', 'https://content.dropboxapi.com/2/files/download', true);
    xhr.setRequestHeader('Authorization', 'Bearer ' + dbox_key_value);
    xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({"path":path}));
    xhr.onreadystatechange = function ()
    {
        if (xhr.readyState == 4)
        {
            if(xhr.status == 200)
            {
                callback(xhr.responseText);
            }
            else
            {
                callback(null);
            }
        }
    }
    xhr.send();
}
function dbox_cat_file ( path , callback ) { var xhr = new XMLHttpRequest ( ) ; xhr . open ( 'POST' , 'https://content.dropboxapi.com/2/files/download' , true ) ; xhr . setRequestHeader ( 'Authorization' , 'Bearer ' + dbox_key_value ) ; xhr . setRequestHeader ( 'Dropbox-API-Arg' , JSON . stringify ( { "path" : path } ) ) ; xhr . onreadystatechange = function ( ) { if ( xhr . readyState == 4 ) { if ( xhr . status == 200 ) { callback ( xhr . responseText ) ; } else { callback ( null ) ; } } } xhr . send ( ) ; }
depends on the folder already having been ls'd into not_file_ls element.
depends on the folder already having been ls ' d into not_file_ls element .