org.apache.Commons.net.ftp UPLOAD

Asked

Viewed 90 times

-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 crashes and does not give me a return if it completed the upload. If the file is smaller I don’t have this kind of problem. It follows as I am 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
            }

Anyone can help?

  • People giving -1 in the post but do not give an opinion!? That’s right? There was some doubt in my question?

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.