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

希望添加对无后缀文件的预览选项 #6417

Closed
4 tasks done
Cnily03 opened this issue May 3, 2024 · 3 comments
Closed
4 tasks done

希望添加对无后缀文件的预览选项 #6417

Cnily03 opened this issue May 3, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Cnily03
Copy link

Cnily03 commented May 3, 2024

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure this feature is not implemented.
  • I'm sure it's a reasonable and popular requirement.

Description of the feature / 需求描述

诸如 Dockerfile 等文件固定为文本文件,但是当前的 alist 只能设置后缀名

Suggested solution / 实现思路

希望对“预览”配置增加一个根据文件名(或其正则)的配置(而不仅仅是根据后缀名来设置)

或者在前端能够支持?type=txt的 URL 参数

Additional context / 附件

No response

@Cnily03 Cnily03 added the enhancement New feature or request label May 3, 2024
Copy link

welcome bot commented May 3, 2024

Thanks for opening your first issue here! Be sure to follow the issue template!

@potoo0
Copy link
Contributor

potoo0 commented May 6, 2024

@xhofe 我也有类似需求,你觉得以下方式哪种比较好?

  • 设置/预览文本类型 支持正则/或者简单通配符
  • 前端从地址参数获取 type,文件详情页面增加 以文本方式预览 按照

Sakura-Byte added a commit to Sakura-Byte/alist-web that referenced this issue May 11, 2024
Enable Text Editor for Unknown file, while making Download stays at the first place for Unknown files.

(close: AlistGo/alist#6417)
@potoo0
Copy link
Contributor

potoo0 commented May 23, 2024

使用说明( 后续会补充到文档里 ):

请求参数加 type, 可选值(不区分大小写):

UNKNOWN
FOLDER
VIDEO
AUDIO
TEXT
IMAGE

示例: http://alist.code.com/local/test.ahk?type=text

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

Successfully merging a pull request may close this issue.

2 participants