如何将图像上传到Android应用程序中的FTP服务器?(How do you upload images to an FTP server within an Android app?)

编程入门 行业动态 更新时间:2024-10-27 09:48:31
如何将图像上传到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/

更多推荐

本文发布于:2023-07-08 01:00:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1070195.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何将   应用程序   图像   服务器   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!