Hi,
I have a dropzone where I'm supposed to drop an image. The Image should be uploaded only if the user presses some other Submit button. I have js:
var myDropzoneMeta = new Dropzone("#metaImage",
{
url: "/file/post",
autoProcessQueue: false,
autoDiscover: false,
maxFiles: 1,
addRemoveLinks: true,
init: function () {
this.on("maxfilesexceeded", function (file) {
this.removeAllFiles();
this.addFile(file);
});
this.on("thumbnail", function (file) {
//here is the problem I need to get the file name and file path and put it in something
});
}
});$("#metaImage").addClass('dropzone');Then I have in my view
<label for="metaImage" class="col-form-label">Meta Image</label><div id="metaImage"><div class="dz-message" data-dz-message><span>Drop Image Here</span></div></div>
and the script to handle the post
$.post("/umbraco/DealManager/Deal/SaveDeal",
{
'Id': @deal.Id,
'MetaImage'://here I'm supposed to send the image file name and path
})
Problem is how do I get the file name and file path from the dropzone?
Please help