und legen Sie sie dort ab oder klicken Sie,
um eine Datei auszuwählen" } settings = Object.assign(default_settings, settings); //console.log(settings); jQuery(this).dropzone({ url: "https://xpertic.ae/wp-admin/admin-ajax.php?action=startklar_drop_zone_upload_process", addRemoveLinks: true, dictDefaultMessage: settings["button_message"], dictRemoveFile:'', dictCancelUpload:'', init: function() { dzClosure = this; this.on("sending", function(file, xhr, formData) { var input_val = jQuery(this.element).closest("form").find("input.dropzone_hash").val(); var json_obj = JSON.parse(input_val); var hash = json_obj["dropzone_hash"]; formData.append("hash", hash); //console.log(formData) }); }, removedfile: function(file) { var fileName = file.name; var input_val = jQuery(this.element).closest("form").find("input.dropzone_hash").val(); var json_obj = JSON.parse(input_val); var hash = json_obj["dropzone_hash"]; jQuery.post("https://xpertic.ae/wp-admin/admin-ajax.php?action=startklar_drop_zone_upload_process", { mode: "remove", hash:hash, fileName:fileName }, function( data ) {} ); if (file.previewElement != null && file.previewElement.parentNode != null) { file.previewElement.parentNode.removeChild(file.previewElement); } return this._updateMaxFilesReachedClass(); }, maxFilesize:settings["maximum_upload_file"], maxFiles:settings["files_amount"], acceptedFiles:settings["allowed_file_types_for_upload"] }); } }); var p_form = jQuery(".dropzone_container").closest("form"); if ( typeof p_form !== "undefined" ){ jQuery(p_form).on('submit_success', function(){ var hash_input_str = jQuery(p_form).find("input.dropzone_hash").val(); var objDZ = Dropzone.forElement(jQuery(this).find(".dropzone_container")[0]); objDZ.emit("reset"); objDZ.removeAllFiles(true); jQuery(this).find(".dropzone_container").trigger("reset"); var new_hash_val = MD5(Date.now()).substring(0, 10); var old_hash_val = hash_input_str .match(/"dropzone_hash"\s*:\s*"([^"]+)"/)[1]; var new_hash_input_str = hash_input_str.replace(old_hash_val, new_hash_val); jQuery(this).find("input.dropzone_hash").val(new_hash_input_str); }); } }else{ setTimeout(searchDropZoneContainer, 100); window.loop_cntr++; } } var MD5 = function(d){result = M(V(Y(X(d),8*d.length)));return result.toLowerCase()};function M(d){for(var _,m="0123456789ABCDEF",f="",r=0;r