简体   繁体   English

如何使用Web API在Android中上传图像文件

[英]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.

相关问题 如何使用Retrofit在Android中调用图像上传Web服务(ASP.NET).asmx文件 - How to call the Image upload web service (ASP.NET ) .asmx file in android using Retrofit Android Studio:将图像上传到Web API - Android studio: upload image to web API 如何使用http客户端在Web Api中上传图像? - How to upload image in Web Api using http client? 如何使用Retrofit将图像文件从Android上传到ASP.NET(Web Services- ASMX)上传文件夹 - How to upload image file from Android to ASP.NET(Web Services- ASMX) upload folder using Retrofit 如何使用 Google Drive API 从 android 将加密的图像文件上传到 Google Drive - How to upload encrypted image file on google drive from android using Google Drive API 如何使用php web服务将图像从android上传到mongodb - how to upload image from android to mongodb using php web servies 如何在 android 中使用解析 api 在解析服务器中上传图像 - How to upload an image in parse server using parse api in android 从 android 上传图像文件到 laravel api - Upload image file to laravel api from android 如何在Android中使用HttpPost上传图像和视频文件 - How to upload Image and Video file using HttpPost in android 使用Android将文件.csr上传到Web服务器 - Upload file .csr to web server using Android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM