Lines Matching defs:file

2  * http://github.com/valums/file-uploader
4 * Multiple file upload component with progress-bar, drag-and-drop.
251 * Creates upload button, validates upload, but doesn't create file list or dd.
274 typeError: "{file} has invalid extension. Only {extensions} are allowed.",
275 sizeError: "{file} is too large, maximum file size is {sizeLimit}.",
276 minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.",
277 emptyError: "{file} is empty, please select files again without it.",
402 _validateFile: function(file){
405 if (file.value){
406 // it is a file input
408 name = file.value.replace(/.*(\/|\\)/, "");
411 name = file.fileName != null ? file.fileName : file.name;
412 size = file.fileSize != null ? file.fileSize : file.size;
438 r('{file}', this._formatFileName(fileName));
476 * Class that creates upload widget with drag-and-drop and file list
491 '<div class="qq-upload-button">Upload a file</div>' +
495 // template for one item in file list
497 '<span class="qq-upload-file"></span>' +
511 file: 'qq-upload-file',
630 var fileElement = this._find(item, 'file');
758 // if set to true adds multiple attribute to file input
760 // name attribute of file input
761 name: 'file',
784 /* returns file input element */
788 /* cleans/recreates the file input */
804 input.setAttribute("type", "file");
843 // IE and Opera, unfortunately have 2 tab stops on file input
878 * Adds file or file input to the queue
881 add: function(file){},
883 * Sends the file identified by id and additional query params to the server
898 * Cancels file upload by id
914 * Returns name of the file identified by id
918 * Returns size of the file identified by id
971 // remove file input from DOM
1001 throw new Error('file with passed id was not added, or already uploaded or cancelled');
1047 // when we upload file with iframe
1101 // Because in this case file won't be attached to request
1125 // current loaded size in bytes for each file
1132 input.type = 'file';
1145 * Adds file to the queue
1148 add: function(file){
1149 if (!(file instanceof File)){
1153 return this._files.push(file) - 1;
1156 var file = this._files[id];
1158 return file.fileName != null ? file.fileName : file.name;
1161 var file = this._files[id];
1162 return file.fileSize != null ? file.fileSize : file.size;
1165 * Returns uploaded bytes for file identified by id
1171 * Sends the file identified by id and additional query params to the server
1175 var file = this._files[id],
1206 xhr.send(file);