|
@@ -105,8 +105,9 @@ function imageInit(){
|
|
e.preventDefault();
|
|
e.preventDefault();
|
|
// gathering the form data
|
|
// gathering the form data
|
|
var ajaxData;
|
|
var ajaxData;
|
|
|
|
+
|
|
|
|
|
|
-
|
|
|
|
|
|
+ var i = 0;
|
|
if( droppedFiles )
|
|
if( droppedFiles )
|
|
{
|
|
{
|
|
ajaxData = new FormData();
|
|
ajaxData = new FormData();
|
|
@@ -150,6 +151,17 @@ function imageInit(){
|
|
form.classList.remove( 'is-uploading' );
|
|
form.classList.remove( 'is-uploading' );
|
|
alert( 'Error. Please, try again!' );
|
|
alert( 'Error. Please, try again!' );
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ var object = {};
|
|
|
|
+ajaxData.forEach(function(value, key){
|
|
|
|
+ object[key] = value;
|
|
|
|
+});
|
|
|
|
+ console.log(JSON.stringify(object));
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
ajax.send( ajaxData );
|
|
ajax.send( ajaxData );
|
|
form.classList.remove( 'is-uploading' );
|
|
form.classList.remove( 'is-uploading' );
|
|
form.classList.remove( 'is-error', 'is-success' );
|
|
form.classList.remove( 'is-error', 'is-success' );
|