I’ve added dropzone in my project and added following code:
if (Meteor.isServer) {
Meteor.startup(function () {
UploadServer.init({
tmpDir: process.env.PWD + '/public/uploads',
uploadDir: process.env.PWD + '/public/uploads',
checkCreateDirectories: true,
uploadUrl: '/upload'
});
});
}
In template:
<form id="add-project">
<div class="form-group">
<label for="title">Project Title</label>
<input type="text" class="form-control required" id="title" name="projectTitle" placeholder="Project Title">
</div>
<div class="form-group">
<label for="upload">Upload Files</label>
{{>dropzone url="/upload" id="template-helper"}}
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-block">Submit</button>
</div>
</form>
How can i submit dropzone data into my collection when the form is submitted and how to retrieve them?
Is there any customization(Cropping Image, generate different size thumbnails) options available for dropzone?