2
우리는 orbot을 사용하여 이미지를 업로드하는 솔루션을 찾고 있습니다. 우리는 안드로이드 클라이언트를 사용하여이를 구현하고 서버 측 스프링 부트가 사용됩니다. 이미지 (3 개 이미지 이상)를 업로드하면 이미지가 업로드되는 경우에도 Android에서 소켓 예외가 발생합니다.orbot을 사용하는 스프링 부트 업로드 이미지
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();
}
는 문제에 직면하고 위치를 업로드하고하는 방법 .. 몇 가지 코드를 표시합니다. –
원본 게시물을 업데이트하십시오. 확인하십시오. – Opv
모든 의견 ?? – Opv