机器人 - 发送参数,同时上传文件 [英] android - send parameters while uploading file
问题描述
我这有一张code http://pastebin.com/VrMNuxcv 它成功地上传一个文件到从我的Android服务器。
I've got this piece of code http://pastebin.com/VrMNuxcv which successfully uploads a file onto the server from my android.
我想,但要能与它发送几个串参数一起
I'd like to , however to be able to send a couple of string parameters together with it.
能否请你告诉我,如果可能的话,在什么地方,我需要做的那块code又如何?
Could you please tell me, if possible, where exactly I need to do this in that piece of code and how?
谢谢 安德烈亚斯
推荐答案
我认为你在的服务器如何处理上载,即控制,你写的服务器code太???
I assume that you're in control of how the server processes the upload, i.e., you wrote the server code too???
如果是这样,我只是为某些客户端/服务器code使用的自定义/专用请求属性(即prefixed X-)我已经写了。示例...
If so, I simply use custom/private request properties (i.e., prefixed x-) for some client/server code I've written. Example...
conn.setRequestProperty("x-myapp-param1", "Parameter 1 text");
任何使用吗?
Any use to you?
这篇关于机器人 - 发送参数,同时上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!