我要传递图像和多字符串到服务器。。对于向服务器发送图像,我使用库“net”。gotev:uploadservice:2.1"
但是,因为我的字符是utf8,所以在db中保存时显示????我该怎么办?
我的android代码:
new MultipartUploadRequest(this, uploadId, Constants.UPLOAD_URL)
.addFileToUpload(path, "image") //Adding file
.addParameter("name", strFileName)
.addParameter("iduser", iduser+"") //Adding text parameter to the request
.addParameter("madah",madah.getText().toString() )
.addParameter("phone",phone.getText().toString())
.addParameter("sokhanran",sokhanran.getText().toString())
.addParameter("startdate", startdate.getText().toString())
.addParameter("enddate",enddate.getText().toString())
.addParameter("descript", descriptin.getText().toString())
.addParameter("linkax", linkax)
.addParameter("address",address.getText().toString())
.setNotificationConfig(new UploadNotificationConfig())
.setMaxRetries(2)
.startUpload();
1条答案
按热度按时间pod7payv1#
使用.setmethod(“post”).setutf8charset().setmaxretries(2).startupload();