我们正在寻找一个解决方案,其中上传图像使用orbot。我们使用Android客户端来实现它,服务器端使用了spring引导。当我们上传图像(3张或更多)时,即使图像被提升,我们也会在Android中获得套接字异常。
以下是Spring的示例代码:
public @ResponseBody Response addAttachments(@ModelAttribute("atForm") AtForm atForm, @RequestHeader(value="ts", required=false) String ts) throws Exception {
Response res = new Respose();
saveAttachments(atForm.getAtachments(), ts);
return response;
}
private void saveAttachments(MultipartFile[] attachments, String ts) {
if(attachments!=null && attachments.length > 0) {
for(MultipartFile file : attachments){
saveFile(file);
}
}
}
public String saveFile(MultipartFile mFile) throws IOException {
File convFile = new File(PATH+mFile.getOriginalName());
FileCopyUtils.copy(mFile.getBytes(), convFile);
return fileName.toString();
}发布于 2017-01-01 07:58:34
经过几天的测试,我们发现,这个问题与网络速度有关,工作良好的是网络速度是好的。因此,orbot网络不能在慢网络上工作。
谢谢,
操作
https://stackoverflow.com/questions/41299901
复制相似问题