org.apache.commons.net.ftp UPLOAD

-3

I am uploading a file to the server but if the file is a bit large (200mb +) the upload is finished but the program hangs and does not give me a return if the upload is complete. If the file is smaller I do not have this kind of problem. Here's how I'm doing:

            ftp.login(usuario, senha);
            ftp.setFileType(FTPClient.BINARY_FILE_TYPE);
            ftp.enterLocalPassiveMode();

            arquivo = new File(file);
            InputStream is = new FileInputStream(arquivo.getAbsolutePath());

            // TRAVANDO AQUI MAS O ARQUIVO É ENVIADO
            boolean retorno = ftp.storeFile("/" + usuario + "/" + arquivo.getName(), is); 

            if (retorno) {
                 //faz algo
            }else{
                //faz algo
            }

Can anyone help?

    
asked by anonymous 20.09.2016 / 22:50

1 answer

0

I was able to solve my problem.

For registration I found the solution in this post link

    
22.09.2016 / 23:03