私を助けてください。私はelfinderを使用していますが、問題があります。
カスタム コマンドをクリックすると、[ダイアログ ボックスを開く] (アップロード用) が開きます。カスタム アップロードを実装したいのですが、どうすればよいですか?
これは私のコードです:
$().ready(function() {
// elFinder.prototype.i18.en.messages['cmdeditimage'] = 'Edit Image';
// elFinder.prototype.i18.de.messages['cmdeditimage'] = 'Bild bearbeiten';
elFinder.prototype._options.commands.push('My_command');
elFinder.prototype.commands.My_command = function() {
this.exec = function(hashes) {
//request from server
}
this.getstate = function() {
//return 0 to enable, -1 to disable icon access
return 0;
}
}
var elf = $('#elfinder').elfinder({
resizable: false,
lang: 'en', // language (OPTIONAL)
url : 'assets/elfinder/php/connector.php', //connector URL
width:'100%',
uiOptions : {
// toolbar configuration
toolbar : [
['back', 'forward'],
['reload'],
['home', 'up'],
['mkdir', 'mkfile', 'upload'],
['open', 'download', 'getfile'],
['info'],
['quicklook'],
['copy', 'cut', 'paste'],
['rm'],
['duplicate', 'rename', 'edit', 'resize'],
['extract', 'archive'],
['search'],
['view'],
['help'],
['My_command']
]
// directories tree options
}
}).elfinder('instance');
});
</script>