[英]How to upload image file in android using web api
I want to upload images using web api. 我想使用Web API上传图像。 I tried to get binary data of images and send them as string or json parameter. 我试图获取图像的二进制数据并将其作为字符串或json参数发送。 But binary data string is too long and after some time the application was stopping. 但是二进制数据字符串太长,一段时间后应用程序停止了。
Web api was writed in c#. Web API是用C#编写的。 And i have some images, i have to upload these when user clicks sync button. 我有一些图像,当用户单击“同步”按钮时,我必须上传这些图像。 How can i do that? 我怎样才能做到这一点?
you need to send the data over internet in XML form. 您需要以XML格式通过Internet发送数据。 convert your data information in XML form and after that send it to API. 将您的数据信息转换为XML格式,然后将其发送到API。 many API receive data in only XML format. 许多API仅以XML格式接收数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.