diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/js/oc-dialogs.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index f4c339702e1..ed4d7c678e1 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -244,17 +244,19 @@ var OCdialogs = { return defer.promise(); }, _getFileList: function(dir, mimeType) { - if (typeof(mimeType) === "object") { - return $.getJSON( - OC.filePath('files', 'ajax', 'rawlist.php'), - {dir: dir, "mimetype_list": JSON.stringify(mimeType)} - ); - } else { - return $.getJSON( - OC.filePath('files', 'ajax', 'rawlist.php'), - {dir: dir, mimetype: mimeType} - ); + if (typeof(mimeType) === "string") { + var tmp = mimeType; + mimeType = new Array(); + mimeType[0] = tmp; } + + return $.getJSON( + OC.filePath('files', 'ajax', 'rawlist.php'), + { + dir: dir, + mimetypes: JSON.stringify(mimeType) + } + ); }, _determineValue: function(element) { if ( $(element).attr('type') === 'checkbox' ) { |