Releases: mjpclab/go-http-file-server
Version 1.11.3
Main changes
- upload: the whole page accepts drop files
- mkdir: can create multi hierarchy directories at once
- bug fix and improvements
主要变更
- 上传:整个页面都可接受文件拖放
- 建目录:可以一次性创建多个层级
- 错误修复和改进
Version 1.11.2
Main Improvements
- can paste files to upload for supported browser, which currently is Chrome 91+
- add clear button to filter
- prevent filename being translated by user agent
- minor improvments and fixes
主要改进
- 添加粘贴文件触发上传的功能,目前支持的浏览器为Chrome 91+
- 为过滤文件名添加清除按钮
- 避免文件名被浏览器翻译
- 其他次要改进和修复
Version 1.11.1
Main changes
- feat(archive): add API for archive selected paths(see API doc for detail)
- fix(archive): skip archive unexpected directory files when in "empty root" mode
- fix(archive): aliased directory should also follow hide rule(by --show, --hide, etc)
- fix(delete): cannot delete files from the build for Windows 2000 platform
主要变更
- 特性(打包):提供API来打包特定目录(详见API文档)
- 修复(打包):如果使用空虚拟根目录,不要打包非预期的额外文件
- 修复(打包):别名也应受显示/隐藏规则约束(通过--show,--hide等)
- 修复(删除):用于Windows 2000的构建无法删除文件
Version 1.11.0
Main changes
Breaking change: add theme support
Before
To specify a custom html template for file list page, use --template
to specify that file.
After
The template file, together with assets like CSS or JS, are archived
into a zip file as theme file. Use --theme to specify that theme file.
- use
--themeto specify theme(zip) file - remove
--templateto specify page template - template file is now inside theme file
--theme <file>
Specify a zip archive file as custom theme for rendering page and assets, instead of builtin ones.
Theme contents are cached in memory at runtime.
--theme-dir <directory>
Specify a directory which contains theme files.
Theme contents will be evaluated for each request.
It is convenient for developing themes.
Notes for theme options:
--theme and --theme-dir are mutually exclusive.
--theme-dir is prior.
Page template filename is always "index.html".
Use "?asset=<asset-path>" to reference an asset in theme.
Improvements
- feat(serverHandler/page): compress file list page if possible
Output gzip/deflate compressed content for file list page if client supports.
- feat(tpl): add translation support
Detect acceptable language from client and render proper language.
Suported languages are en-US, zh-CN, zh-TW and zh-HK.
- feat(json): add
isVirtualfield to item for aliased directory - fix(json): output subItems for empty-root mode
主要变更
破坏性变更:添加主题支持
之前
要为文件列表页指定自定义模板,使用--template指定该文件。
之后
模板文件,以及其他静态资源如CSS和JS,将被一起打包进一个zip文件,作为主题文件。
使用--theme指定该文件。
- 使用
--theme指定主题(zip)文件 - 移除用于指定模板的
--template - 模板文件现在位于主题文件中
--theme <主题文件>
指定用于渲染页面和静态资源的自定义主题zip压缩文件,代替内建主题。
主题的内容在运行时一直缓存在内存中。
--theme-dir <主题目录>
指定主题文件所在的目录。
每次请求时主题内容都会重新计算。
这为开发主题提供了便利。
主题选项注意事项:
--theme和--theme-dir是互斥的。
--theme-dir更为优先。
页面模板文件名固定为“index.html”。
使用“?asset=<asset-path>”格式来引用主题中的静态资源。
改进
- feat(serverHandler/page): 如果可能,文件列表页启用压缩
如果客户端支持,为文件列表页输出用gzip/deflate压缩过的内容
- feat(tpl): 添加翻译支持
检测客户端可接受的语言并渲染正确的语言。
支持的语言为en-US,zh-CN,zh-TW和zh-HK。
- feat(json): 添加
isVirtual字段用来表示别名目录 - fix(json): 修复为空虚拟根目录输出子项
Version 1.10.14
Version 1.10.13
Version 1.10.12
Main improvements
use Option key to focus first/last item on Mac platform
On Mac platform, Cmd+ArrowLeft and Cmd+ArrowRight shotcut key is
used by browser to navigate page backward and forward. So for moving to
first/last item, change the shortcut key from Cmd to Opt.
Support uploading pasted image or text
When uploading is enabled for a directory, pasting image or text content will upload that content as a file.
add download param for directory list page
If param download exists in URL parameter when rendering a directory
list page, render a download tool friendly page:
- hide path list
- hide sortable header
- hide parent directory link
That's convenient for tools like "wget" to download files recursively. e.g.
wget --recursive -nc -nH -np http://localhost/dir/?downloadfix: escape special chars in filename in URL
Escape chars like ?, &, # and = to avoid being treated as meta characters.
主要改进
Mac平台使用Option键来移动到首/末项
在Mac平台,Cmd+左方向键和Cmd+右方向键已被浏览器用来前进和后退。因此使用Opt键代替Cmd键。
上传粘贴的图像和文本
当某个目录启用上传后,粘贴图像或文本会将此内容上传为文件。
为目录列表页添加download参数
如果URL参数中出现download,显示一个对下载工具友好的页面:
- 隐藏路径列表
- 隐藏可排序表头
- 隐藏上级目录链接
这为“wget”之类的工具递归下载提供了方便。例如:
wget --recursive -nc -nH -np http://localhost/dir/?download修复:对URL中文件名中的特殊字符转义
对字符?,&,#和=转义以避免被识别为元字符。
Version 1.10.9
There is no behavior change since v1.10.8.
The reason to create this version is to support new branch main-go1.2, which targets to build executable binaries for legacy Windows 2000 platform.
与1.10.8版相比没有任何行为变更。
创建此版本是为了支撑新分支main-go1.2,它用于为老旧的Windows 2000平台构建可执行二进制文件。
Version 1.10.8
Minor fixes and improvements.
功能和稳定性改进。
Version 1.10.7
Main changes
- fix(serverHandler): prevent mutation from parent directory
- feat(tpl): support drag drop directories for uploading
主要变更
- 修复:防止服务端变更接受上级目录
- 新增:支持拖放方式上传目录