如何上传图片到Android中使用Web服务的服务器? [英] How to Upload Image to server using webservice in Android?

查看:319
本文介绍了如何上传图片到Android中使用Web服务的服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有开发Android应用程序,其中一个用户配置是存在的。我一直在使用Ksoap2发送的用户的所有细节服务器。我也想发送图像到服务器。但是,我不知道如何发送图像android中使用Web服务Ksoap2。

I have develop android app in which one UserProfile is there. I have send all details of user to server using Ksoap2. I also want to send image to server. But, i don't know how to send image to webservice using Ksoap2 in android.

我从SD卡取图像,并将其转换成的ByteArray。有没有我要的参数发送作为图像的ByteArray的web服务?我想用户和图像所有细节传递给web服务。我怎样才能做到这一点?

I have take image from sdcard and convert it to ByteArray. Is there I have to send that parameter as ByteArray of image to webservice? I want to pass all details of user and image to webservice. How can I do this?

推荐答案

您可以将您的图像在服务器端转换成字符串的base64,然后再处理这些图像。

You can convert the your image into base64 string,and then handle them again to image at server side.

这篇关于如何上传图片到Android中使用Web服务的服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆