Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

指定文件加载 #3

Closed
iamHuFei opened this issue Jul 24, 2024 · 8 comments
Closed

指定文件加载 #3

iamHuFei opened this issue Jul 24, 2024 · 8 comments

Comments

@iamHuFei
Copy link

iamHuFei commented Jul 24, 2024

大部分存储桶上传路径是有规律的,所以不需要一个个全看,工具能不能加一个功能:所有路径可视,点击指定路径打开

@jdr2021
Copy link
Owner

jdr2021 commented Jul 25, 2024

类似这样嘛?
1721881368995

@iamHuFei
Copy link
Author

对的。perfect。这是全下载到本地了?只要能点哪个看哪个就行

@jdr2021
Copy link
Owner

jdr2021 commented Jul 25, 2024

已经更新https://github.com/jdr2021/OSSFileBrowse/releases/tag/v1.1
压缩包下载后,点击里面的bat文件就行了
没有下载本地,用的treeview和treeitem做的。
你点击对应文件应该可以切换查看。
不过你得换kkfileview的接口地址了,官方好像有限制了。

@iamHuFei
Copy link
Author

官方接口很慢,fofa找一个就可以了。可以把kkfileview的接口地址的配置这里设置成可保存,下一次打开就不默认官方的了。其他没啥问题了,感谢大大的贡献。

@jdr2021 jdr2021 closed this as completed Jul 25, 2024
@jdr2021 jdr2021 reopened this Jul 25, 2024
@jdr2021 jdr2021 closed this as completed Jul 25, 2024
@iamHuFei
Copy link
Author

image
老哥路径错了

@jdr2021 jdr2021 reopened this Jul 25, 2024
@jdr2021
Copy link
Owner

jdr2021 commented Jul 25, 2024

是多了一个cnud嘛?要不你直接看源码改吧,hhh

@jdr2021
Copy link
Owner

jdr2021 commented Jul 25, 2024

知道原因了,你这里是有个cnud的Bucket吧,我代码的问题。我改改

@jdr2021
Copy link
Owner

jdr2021 commented Jul 25, 2024

修复方法:
新增一个方法获取域名

public static String getDomain(String fullUrl) {
        String regex = "^(https?://[^/]+)";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(fullUrl);
        String result="";
        if (matcher.find()) {
            result = matcher.group(0);
        }
        return result;
    }

然后在src/main/java/net/jdr2021/controller/mainController.java这里调用该方法
handleNodeSelected方法里面原逻辑是

String url = remove(tf_oss_url.getText())+ selectedPath;

修改后的逻辑是

String url = remove(getDomain(tf_oss_url.getText()))+ selectedPath;

已经修复bug(只更新了release,没更新源码)
https://github.com/jdr2021/OSSFileBrowse/releases/tag/v1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants