diff --git a/changelog.txt b/changelog.txt index 1b8d7f223..ed4662418 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Version 1.2.2 (2010-xx-xx) Added new FILE_SIZE_ERROR type that will be triggered if the user selected a file that is to large or zero bytes. Added new FILE_EXTENSION_ERROR type that will be triggered if you add a file with an invalid file extension. Fixed so the plupload.buildUrl function uses the UTF compatible encodeURIComponent method instead of escape. + Fixed so that all file types can be selected if you don't specify a filter setting. Fixed some issues with the HTML4 runtime if there wasn't any existing forms on the page. Fixed some conflict issues with HTML4 runtime and forms with the input names of action or target. Fixed bug where some Gecko versions would produce exceptions when checking the HTTP status of a XHR. diff --git a/src/javascript/plupload.js b/src/javascript/plupload.js index de35899c5..fc1d1facc 100644 --- a/src/javascript/plupload.js +++ b/src/javascript/plupload.js @@ -590,9 +590,7 @@ max_file_size : '1gb', multi_selection : true, file_data_name : 'file', - filters : [ - {title : "Image files", extensions : "jpg,gif,png"} - ] + filters : [] }, settings); // Private methods @@ -722,13 +720,13 @@ // Add files to queue self.bind('FilesAdded', function(up, selected_files) { - var i, file, count = 0, extensionsMap; + var i, file, count = 0, extensionsMap, filters = settings.filters; // Convert extensions to map - if (settings.filters) { + if (filters && filters.length) { extensionsMap = {}; - plupload.each(settings.filters, function(filter) { + plupload.each(filters, function(filter) { plupload.each(filter.extensions.split(/,/), function(ext) { extensionsMap[ext] = true; });