-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
能否支持zip、tar等压缩包的在线内容预览 #5114
Comments
https://pkg.go.dev/archive/zip#NewReader |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
强烈支持! |
这个想做的话得前端做吧?因为不管302还是proxy最终给到前段的都是一个url,后端做的话必须下载下来,读取文件 |
zip 格式 好像有通过range header 实现io.ReadAt 的https://github.com/snabb/httpreaderat |
https://github.com/mholt/archiver 可以实现rar,7z,zip,tar的解压,压缩方式涵盖了,bz2,gzip,xz,等多种。 目前实验性的写了几个接口可以做到,平铺所有层级目录文件,或者像文件系统一样一级一级查看,实现在服务器上只下载压缩包内指定文件。 但是目前不知道alist想怎么设计这个功能,比如权限设计,接口参数设计,缓存设计等。我觉得这个功能甚至可以单独作为一个插件,通过提供下载链接(不论302还是代理),在线解析压缩包目录,下载指定文件(如果要支持在线播放,可能还要能支持(range header)。 |
解压部分可参考实验性代码 |
因为临近毕业,最近在忙着写毕业论文,所以暂时不会思考添加新的feature |
@xhofe 求merge,这个功能太实用了! |
现在有考虑支持吗? |
等一个支持…… |
如果在线列出压缩包内目录树实现有难度,是否可以先解压到当前目录? |
安卓的MiXplorer软件已经实现了压缩包预览,说明是可以实现的 |
It's possible because Zip support random reads. That's the reason why you can view or preview zip files over http or a network. |
Please make sure of the following things
Description of the feature / 需求描述
实现类似于tar -tvf的效果
Suggested solution / 实现思路
No response
Additional context / 附件
No response
The text was updated successfully, but these errors were encountered: