如何将图像从Android客户端传输到Java服务器
我正在尝试开发一个Android应用程序,它允许使用相机捕获图片,并将图片发送到Java服务器。
之后我不需要图片,所以不需要将其存储在手机本地。
我能够成功地将简单文本从客户端传输到服务器,但我在处理图像时遇到问题。
我需要做什么才能从 Android 客户端发送图像,除了现在正在做的事情之外,还应该在服务器中做一些特殊的事情吗?
I am trying to developer an Android application which allows to capture pictures with the camera, and send the pictures to a Java server.
I don't need the picture after, so I do not need to store it in the phone locally.
I was able to successfully to transfer simple text from client to server, but I'm having problems with images.
What do I need to do to be able to send images from the Android client, and should anything special be made in the server apart from what it is doing now?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案是将 http 请求与 MultipartEntity 一起使用。
Solution is to use http request with MultipartEntity.