META-INF.resources.bower_components.blueimpfileupload.js.jquery.fileupload-validate.min.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-blueimp-fileupload Show documentation
Show all versions of jwebmp-blueimp-fileupload Show documentation
File Upload widget with multiple file selection, drag and drop support, progress bar, validation and preview images, audio and video for jQuery.
Supports cross-domain, chunked and resumable file uploads.
Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.
(function(a){if(typeof define==="function"&&define.amd){define(["jquery","./jquery.fileupload-process"],a)}else{if(typeof exports==="object"){a(require("jquery"),require("./jquery.fileupload-process"))}else{a(window.jQuery)}}}(function(a){a.blueimp.fileupload.prototype.options.processQueue.push({action:"validate",always:true,acceptFileTypes:"@",maxFileSize:"@",minFileSize:"@",maxNumberOfFiles:"@",disabled:"@disableValidation"});a.widget("blueimp.fileupload",a.blueimp.fileupload,{options:{getNumberOfFiles:a.noop,messages:{maxNumberOfFiles:"Maximum number of files exceeded",acceptFileTypes:"File type not allowed",maxFileSize:"File is too large",minFileSize:"File is too small"}},processActions:{validate:function(g,d){if(d.disabled){return g}var c=a.Deferred(),f=this.options,e=g.files[g.index],b;if(d.minFileSize||d.maxFileSize){b=e.size}if(a.type(d.maxNumberOfFiles)==="number"&&(f.getNumberOfFiles()||0)+g.files.length>d.maxNumberOfFiles){e.error=f.i18n("maxNumberOfFiles")}else{if(d.acceptFileTypes&&!(d.acceptFileTypes.test(e.type)||d.acceptFileTypes.test(e.name))){e.error=f.i18n("acceptFileTypes")}else{if(b>d.maxFileSize){e.error=f.i18n("maxFileSize")}else{if(a.type(b)==="number"&&b
© 2015 - 2025 Weber Informatics LLC | Privacy Policy