是否可以将图像从我的 Android 应用程序上传到 FTP 服务器?该图像已经使用相机捕获。
在桌面应用程序中,我们使用 FTP 客户端将任何文件/图像上传到实时服务器。我们如何在 Android 应用程序中做类似的事情?
使用这个对我来说效果很好......
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/simplleftp/ http://www.jibble.org/simpleftp/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)