我正在尝试修改FancyUpload插件以接受以下文件扩展名。
我已经有了搜索者,但关于此的所有主题都已过时,但它不起作用。此插件有两个文件index.php
和scrip.js
,其中有相同的过滤器。我已经改变了这一点,但没有任何作用。
这是我到目前为止所尝试的:
的index.php
$('demo-browse').addEvent('click', function() {
swiffy.browse();
return false;
});
$('demo-select-images').addEvent('change', function() {
var filter = null;
if (this.checked) {
filter = {'docs (*.jpg, *.jpeg, *.txt, *.gif, *.png, *.doc, *.docx, *.pdf, *.xlsx, *.ppt, *.pdf)': '*.jpg; *.jpeg; *.txt; *.gif';*.png, *.docx, *.pdf;*.xlsx;*.ppt;*.pdf};
//filter = {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'};
}
swiffy.options.typeFilter = filter;
});
的script.js
$('demo-browse').addEvent('click', function() {
swiffy.browse();
return false;
});
*/
$('demo-select-images').addEvent('change', function() {
var filter = null;
if (this.checked) {
filter = {'docs (*.jpg, *.jpeg, *.txt, *.gif, *.png, *.doc, *.docx, *.pdf, *.xlsx, *.ppt, *.pdf)': '*.jpg; *.jpeg; *.txt; *.gif';*.png, *.docx, *.pdf;*.xlsx;*.ppt;*.pdf};
//filter = {'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'};
}
swiffy.options.typeFilter = filter;
});