In my servlet I'm not getting the value of mode


#1

Hi!
I am trying to use the Vault component with servlets, when I start the component I receive the value of mode = ‘conf’ in the servlet as the documentation indicates, but when uploading a file my servlet no longer receives anything, I need to configure something else?

function loadImg(){
dhxWins = new dhtmlXWindows();
dhxWins.attachViewportTo(“winVP”);
modal1 = dhxWins.createWindow(“img”, 20, 30, 400, 350);
modal1.setText(“Carga de imágenes”);
var allowableSize = 54321;
myVault = modal1.attachVault({
uploadUrl: “/AjxDataProcSaveImgPCPN”
});
myVault.setFilesLimit(4);
myVault.attachEvent(“onBeforeFileAdd”, function(file){
var tpExt = false;
var tam = false;
var cumple = false;
var ext = this.getFileExtension(file.name);
if(ext===“jpg”||ext===“png” ||ext===“gif”){
tpExt = true;
}
if(file.size < allowableSize){
tam = true;
}
if(tpExt === true && tam === true){
cumple = true;
}
return cumple;
});

        myVault.attachEvent("onUploadFile", function(file){
                alert("onFileAdd, real name: "+file.name+", server name: "+file.serverName);
        });

}