Answer the question
In order to leave comments, you need to log in
What can be used to transfer files to the server?
Good afternoon.
Ask such a question.
I need to write an application that will convert the video and upload it to the server.
Reconverting is understandable, but what to use to upload files to the server?
Finishing the server is not a problem.
As I did not try to find, but I can not properly formulate the question in order to find the answer.
PS. The channel for pouring is narrow and not very stable. That is, you need to resume and check ....
Answer the question
In order to leave comments, you need to log in
If the server is on Spring then CommonsMultipartResolver
Bean
private int maxUploadSizeInMb = 1024 * 1024; // 1 MB
@Bean
public CommonsMultipartResolver multipartResolver(){
CommonsMultipartResolver cmr = new CommonsMultipartResolver();
cmr.setMaxUploadSize(maxUploadSizeInMb * 10);
cmr.setMaxUploadSizePerFile(maxUploadSizeInMb * 5);
return cmr;
}
@ResponseBody
@PostMapping(value = "/upload")
public String setUpload(@RequestParam("upfile")MultipartFile file) {
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question