feat: 完成了 新建桶; 上传文件(基本功能)
todo: 上传 rename, 上传 public 权限选择 bug: 首次加载 conns list; 上传的时候前缀过滤失败
This commit is contained in:
10
xtest/path.js
Normal file
10
xtest/path.js
Normal file
@ -0,0 +1,10 @@
|
||||
function getBaseFileName(fullPath) {
|
||||
return fullPath.replace(/.*[\/\\]/, '');
|
||||
}
|
||||
|
||||
// 测试
|
||||
const filePath = 'C:\\Users\\username\\Documents\\example.txt';
|
||||
console.log(getBaseFileName(filePath)); // 输出: example.txt
|
||||
|
||||
const filePath2 = '/home/user/documents/example.txt';
|
||||
console.log(getBaseFileName(filePath2)); // 输出: example.txt
|
Reference in New Issue
Block a user