private ArrayList<String> loadFiles() {
        ArrayList<String> list = new ArrayList<String>();
        String name, ext;
        
        for(PFile file : Data.getFiles()) {
            if(file.toUpload) {
                name = file.getComponent(Elem.NAME);
                ext = file.getComponent(Elem.EXT);
                
                //cleaning
                if(name.endsWith(" ")) 
                    name = name.substring(0, name.length()-1);
                file.setName(name.replace("  ", " "));
                
                //extra ext
                if(name.endsWith(".jpg")||name.endsWith(".png")||name.endsWith(".gif")||name.endsWith(".pdf")||name.endsWith(".djvu")) {
                    name = name.substring(0, name.lastIndexOf('.'));
                    file.setName(name);
                }
                
                //add
                name += "." + ext;
                list.add(name);
            }
        }
        return list;
    }