如何将图像上传到Android应用程序中的FTP服务器?(How do you upload images to an FTP server within an Android app?)
是否可以将我的Android应用程序中的图像上传到FTP服务器? 该图像已经使用相机拍摄。
在桌面应用程序中,我们使用FTP客户端将任何文件/图像上传到实时服务器。 我们如何在Android应用程序中做类似的事情?
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, we'd use FTP Client to upload any file / image to a live server. How can we do something similar within our Android application?
最满意答案
使用它对我来说工作正常...
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();欲了解更多信息和罐子... http://www.jibble.org/simpleftp/
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/
更多推荐
发布评论