src/run_net_bin.js
function isAlreadyUploaded(file_mngr_url, filename, file_exists_cb, file_absent_cb) {
    var req = new XMLHttpRequest();
    req.open("GET", file_mngr_url + "/test/" + filename);
    req.onload = function(e) {
        var url = JSON.parse(req.response).url;
        if (url === undefined)
            file_absent_cb();
        else
            file_exists_cb(url);
    };
    req.send();
}
function isAlreadyUploaded(file_mngr_url, filename, file_exists_cb, file_absent_cb) {
    var req = new XMLHttpRequest();
    req.open("GET", file_mngr_url + "/test/" + filename);
    req.onload = function(e) {
        var url = JSON.parse(req.response).url;
        if (url === undefined)
            file_absent_cb();
        else
            file_exists_cb(url);
    };
    req.send();
}
function isAlreadyUploaded ( file_mngr_url , filename , file_exists_cb , file_absent_cb ) { var req = new XMLHttpRequest ( ) ; req . open ( "GET" , file_mngr_url + "/test/" + filename ) ; req . onload = function ( e ) { var url = JSON . parse ( req . response ) . url ; if ( url === undefined ) file_absent_cb ( ) ; else file_exists_cb ( url ) ; } ; req . send ( ) ; }
Helper function This function checks if a particular filename already exists. If so it executes the first callback that is passed, otherwise the second one
Helper function This function checks if a particular filename already exists . If so it executes the first callback that is passed otherwise the second one