I want to a get file from user and convert it into some other format.
I used java servlet for this and it works when I call the servlet from Html body tag.
But I want to call servlet from view.js UploadFile.
Here is my Html and view.js code
Where I have to mention the servlet call
<body class="sapUiBody" role="application">
<div id="content"></div>
<div>
<form action="FileUploadServlet" enctype="multipart/form-data" method="GET">
<input type="file" id="file" name="file">
<input type="Submit" value="Upload File">
</form>
</div>
</body>
</html>
view.js
var f=new sap.ui.commons.FileUploader('file',
{
uploadUrl : "/test-resources/",
uploadOnChange : true,
}
Even not only servlets I can use any tech. But It should allow me to call a java method.
Any idea? Please suggest some way to do this.
Thank you in advance