I would like to create a web app with Express and Node.js. I'm currently trying to let user uploads a profile picture and I use Dropzone.js. Here, what I did for now :
<script type="text/javascript">
Dropzone.options.ppDrop = {
paramName: username,
maxFilesize: 10, // MB
maxFiles : 1,
uploadMultiple = false,
acceptedFiles : "image/*",
dictDefaultMessage : "Drop files here or click to upload"
};
</script>
<form action="/PPupload" method="post" class="dropzone" id="ppDrop" enctype="multipart/form-data">
<div class="fallback">
<input name="pic" type="file" />
</div>
</form>
But it doesn't work. What I did wrong ?
I also need help to define a route that could store the image in an internal folder and display it after the user confirms his choice. How I could do that ? Many thanks in advance !