I have this form in my html code:
<form action="upload" id="upload-dropzone" class="dropzone">
<input type="hidden" name="browser-path" id="browser-path" value="/">
<div class="browser-buttons rrtl">
<a id="browser-btn-upload">Upload</a>
</div>
<div class="lltr" id="browser-path-view"></div>
</form>
<script type="application/javascript">
Dropzone.options.uploadDropzone = {
clickable: "#browser-btn-upload",
};
loadBrowserContent();
</script>
As this document said, the hidden input field browser-path
will automatically be submitted as POST data to server.
I have this code in my server side:
System.out.println(request.getParameter("browser-path"));
But this code always prints null
to output!
How can I submit this hidden field to my server and how can I read it?
Edit:
Thanks to steeno, the form enctype
is multipart/form-data
so I have to read the fields from another way.