Hello I need to use http://www.dropzonejs.com/ for upload file in my XPages. I thought about using to use the XAgent for handle Mark Leusink:
http://openntf.org/XSnippets.nsf/snippet.xsp?id=custom-xpage-file-upload-handler
But always I have problem error 500 that's not a file! exception....
it seems that control DropZone js not send the file with the parameter, I do not understand with Firebug
DropZone is very simple...
$(function () {
// $("div#FileIDUpload").dropzone({ url: "xUpload.xsp" });
var myDropzone = new Dropzone("div#FileIDUpload", { url: "xUpload.xsp"});
Dropzone.options.myAwesomeDropzone = {
paramName: "uploadedFile", // The name that will be used to transfer the file
clickable:true,
uploadMultiple:false,
maxFilesize: 2, // MB
accept: function(file, done) {
if (file.name == "justinbieber.jpg") {
done("Naha, you don't.");
}
else { done(); }
}
}
});
Someone have suggestion?
Thanks!
UPDATE
I've solve! the problem is the programmatic use this is correct
$(function () {
// $("div#FileIDUpload").dropzone({ url: "xUpload.xsp" });
var myDropzone = new Dropzone("div#FileIDUpload", {
paramName: "uploadedFile", // The name that will be used to transfer the file
url: "xUpload.xsp",
clickable:true,
uploadMultiple:false,
maxFilesize: 2 // MB
});
});