@ -831,7 +831,11 @@ define([
APP.AddImageErrorCallback = cb2;
common.openFilePicker({
types: ['file'],
where: ['root']
where: ['root'],
filter: {
fileType: ['image/']
}
});
};
@ -111,6 +111,16 @@ define([
//If file, display the upload button
if (types.indexOf('file') !== -1 && common.isLoggedIn()) {
var f = (filters && filters.filter) || {};
delete data.accept;
if (f.fileType) {
data.accept = f.fileType.map(function (val) {
if (/^[a-z]+\/$/.test(val)) {
val += '*';
return val;
$filter.append(common.createButton('upload', false, data));