How do you upload images to an FTP server within an Android app?

后端 未结 1 1773
野趣味
野趣味 2021-01-03 04:20

Is it possible to upload an image from my Android application to an FTP server? The image will have already been captured using the camera.

In a desktop application

相关标签:
1条回答
  • 2021-01-03 04:31

    Use this it is working fine for me...

    SimpleFTP ftp = new SimpleFTP();
    
    
                    // Connect to an FTP server on port 21.
                    ftp.connect("server address", 21, "username", "pwd");
    
                    // Set binary mode.
                    ftp.bin();
    
                    // Change to a new working directory on the FTP server.
    
    
                    ftp.cwd("path");
    
                    // Upload some files.
                    ftp.stor(new File("your-file-path"));              
    
                    // Quit from the FTP server.
                    ftp.disconnect();
    

    for more info and jar ...http://www.jibble.org/simpleftp/

    0 讨论(0)
提交回复
热议问题