How to send file using javascript
I am trying to make an upload page which takes file to upload. I am using Spring framework here my query is on Upload button I am calling a JavaScript method which should send my file to controller using jQuery AJAX. Is there any way to pass this through JavaScript? Following is the code which I am trying. <body> <div style="text-align: center; margin-top: 60px;"> <form enctype="multipart/form-data"> Select file: <input type="file" name="dataFile" id="fileAttachment"/><br/><br/> <div style="text-align: center; margin-top: 100px;"> <input style="cursor: pointer;" onmouseover="" onclick="uploadA
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.