Hello,
I want to upload a file and hand it over to the http:inbound-channel-adapter where the file be processed next.
How should i send the request?
This is what i ve done:
Code:This is the view: <form action="uploadjob" method="post" enctype="multipart/form-data"> Job Configuration File<input type="file" value="Upload" name="file" /> <input type="submit" value="Upload"> </form>Code:public class FileUpload { MultipartFile file; //getters and setters }Please helpCode:@RequestMapping(value="uploadjob", method=RequestMethod.POST) public String upload(Model model, Locale locale, FileUpload file) throws MalformedURLException{ URL url=new URL("http://localhost:8080/org/path/to/inbound-channel-adpater/"); //I am getting the file here using file.getFile() //What shud i do here to send the file return null; }


Reply With Quote
