$("#elfinder").elfinder({
url: 'https://localhost/elfinder',
handlers: {
dblclick: function(event, elfinderInstance) {
var file = event.data.file; //l1_dGVzdC9iYW5uZXJfYmdfaG9yaXpvbnRhbC5qcGc
}
}
});
如何将l1_dGVzdC9iYW5uZXJfYmdfaG9yaXpvbnRhbC5qcGc
解密为banner_bg_horizontal.jpg
(真实文件名)?
答案 0 :(得分:1)
因为您不使用Base64
我用它并且效果很好
答案 1 :(得分:1)
对于elFinder,您需要修改base64 keyStr值+ / = to - _。
var keyStr = "ABCDEFGHIJKLMNOP" +
"QRSTUVWXYZabcdef" +
"ghijklmnopqrstuv" +
"wxyz0123456789+/" +
"=";
改为......
var keyStr = "ABCDEFGHIJKLMNOP" +
"QRSTUVWXYZabcdef" +
"ghijklmnopqrstuv" +
"wxyz0123456789-_" +
".";
然后在解码前删除前缀“l1_”