开发者

Send parameters along with file in android to server

开发者 https://www.devze.com 2023-03-28 14:10 出处:网络
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.

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?


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"));

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消