🖥️ Server: Apache
💻 System: Linux webm015.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
👤 User: stakrfrcol (69043)
🐘 PHP: 8.3.31
🚫 Disabled: _dyuweyrj4,_dyuweyrj4r,dl
📄 ajax-file-upload.js
📁 Path: ./wp-content/plugins/wp-job-manager/assets/dist/js/ajax-file-upload.js
📊 Size: 2.73 KB
🔒 Perm: 0644
📝 MIME: text/plain
jQuery((function(e){e(".wp-job-manager-file-upload").each((function(){e(this).fileupload({dataType:"json",dropZone:e(this),url:job_manager_ajax_file_upload.ajax_url.toString().replace("%%endpoint%%","upload_file"),formData:{script:!0},change:function(){this.validation_errors=[]},add:function(a,i){var t=e(this),r=t.closest("form"),o=t.parent().find(".job-manager-uploaded-files"),n=[],l=!1,s=parseInt(t.data("file_limit"),10);if(void 0!==t.data("file_limit_left")?l=parseInt(t.data("file_limit_left"),10):void 0!==s&&(l=s-parseInt(o.children(".job-manager-uploaded-file").length,10),t.data("file_limit_left",l)),!1!==l&&l<=0){var d="Exceeded upload limit";t.data("file_limit_message")?d=t.data("file_limit_message"):"undefined"!=typeof job_manager_job_submission&&(d=job_manager_job_submission.i18n_over_upload_limit),d=d.replace("%d",s),n.push(d)}var p=e(this).data("file_types");if(p){var _=new RegExp("(.|/)("+p+")$","i");i.originalFiles[0].name.length&&!_.test(i.originalFiles[0].name)&&n.push(job_manager_ajax_file_upload.i18n_invalid_file_type+" "+p)}n.length>0?(this.validation_errors=this.validation_errors.concat(n),i.context=e('<progress value="" max="100"></progress>').appendTo(o),i.submit()):(!1!==l&&t.data("file_limit_left",l-1),r.find(':input[type="submit"]').attr("disabled","disabled"),i.context=e('<progress value="" max="100"></progress>').appendTo(o),i.submit())},progress:function(e,a){var i=parseInt(a.loaded/a.total*100,10);a.context.val(i)},fail:function(a,i){var t=e(this),r=t.closest("form");i.errorThrown&&window.alert(i.errorThrown),i.context.remove(),r.find(':input[type="submit"]').removeAttr("disabled"),t.trigger("update_status")},done:function(a,i){var t=e(this),r=t.closest("form"),o=t.parent().find(".job-manager-uploaded-files"),n=t.attr("multiple")?1:0,l=["jpg","gif","png","jpeg","jpe"];i.context.remove(),void 0===i.result.success||i.result.success||this.validation_errors.push(i.result.data);var s=this;e.each(i.result.files,(function(a,i){var r;i.error?s.validation_errors.push(i.error):(e.inArray(i.extension,l)>=0?(r=e.parseHTML(job_manager_ajax_file_upload.js_field_html_img),e(r).find(".job-manager-uploaded-file-preview img").attr("src",i.url),e("#company_logo").hide(),e(".fieldset-company_logo small.description").hide()):(r=e.parseHTML(job_manager_ajax_file_upload.js_field_html),e(r).find(".job-manager-uploaded-file-name code").text(i.name)),e(r).find(".input-text").val(i.url),e(r).find(".input-text").attr("name","current_"+t.attr("name")),n?o.append(r):o.html(r))})),this.validation_errors.length>0&&(this.validation_errors=this.validation_errors.filter((function(e,a,i){return i.indexOf(e)===a})),window.alert(this.validation_errors.join("\n"))),r.find(':input[type="submit"]').removeAttr("disabled"),t.trigger("update_status")}})}))}));