android系统中发送参数与文件一起到服务器 [英] Send parameters along with file in android to server

查看:143
本文介绍了android系统中发送参数与文件一起到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用这code发送一个文件服务器
<一href=\"http://stackoverflow.com/questions/7037717/upload-an-image-and-audio-in-one-request-in-android\">upload在Android的要求之一的影像和音频

I am using this code to send a file to server upload an image and audio in One request in android

现在我的问题是,我想和请求一起发送一些字符串参数。
我该怎么做?

Now my problem is I want to send some string parameters along with request. How can I do that?

推荐答案

我没有任何的手在这方面的经验,但看你的code,我想你可以做到这一点在code以下

I don't have any hands on experience with this, but from looking at your code, I would think you could do it in the code below

entity.addPart("NEW_PARAMETER", new StringBody("some_value"));

不能你只需要添加更多的这些,并让他们在你的服务器端code就像你访问其他值您发送?

Couldn't you just add more of these, and get them in your server side code just like your accessing the other values your sending?

这篇关于android系统中发送参数与文件一起到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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