Releases: mjpclab/go-http-file-server
Version 1.7.1
Main changes
- feat(tpls): improve delete button positioning
- feat(tpl): use AJAX to enhance delete action
- docs: add API document
主要变更
- feat(tpls): 优化删除按钮位置
- feat(tpl): 使用AJAX增强删除操作的交互
- docs: 添加API文档
Version 1.7.0
Main changes
- Add options for creating directory:
--global-mkdir
,--mkdir
and--mkdir-dir
- Add options for deleting files and directories:
--global-delete
,--delete
and--delete-dir
Extended behavior for upload
If filename exists and is a regular file,
will try to remove it first if deleting is enabled(e.g. by --delete),
otherwise will try to add or increase numeric suffix just like previous version.
Breaking change
File upload url in template changed.
Before:
<directory-path>
After:
<directory-path>?upload
主要变更
- 添加创建子目录的选项:
--global-mkdir
,--mkdir
和--mkdir-dir
- 添加删除文件或目录的选项:
--global-delete
,--delete
和--delete-dir
扩展上传文件的行为
如果名称已存在且是常规文件,
若已启用删除(例如--delete选项),则尝试先删除文件,
否则像之前版本那样尝试添加或递增数字后缀。
破坏性变更
改变了模板中上传文件的URL:
修改前:
<目录路径>
修改后:
<目录路径>?upload
Version 1.6.6
- fix(serverHandler): consider aliased index file on fake directory
- chore: update goNixArgParser
- refactor(optionSet): use value parameter to get copied argument
- feat(optionSet): remove default option delimiter
Version 1.6.4
fix(tpl): enable select pictures on iOS platform
Version 1.6.3
fix(serverHandler): use raw request path to generate sub item prefix
When visiting an aliased directory without tailing "/' in the URL, the
sub item prefix generated is incorrect, because it uses the request path
relative to the alias directory. It should use the path relative to
root.
Version 1.6.2
This release aims at bug fix and performance improvement.
Breaking changes
Getting HTML formatted sub items in template changed.
Before:
{{range .SubItems}}{{with .Html}}
<li class="{{if .IsDir}}dir{{else}}file{{end}}">
<a href="{{$subItemPrefix}}{{.Link}}{{if .IsDir}}/{{end}}">
<span class="name">{{.Name}}{{if .IsDir}}/{{end}}</span>
<span class="size">{{if not .IsDir}}{{.Size}}{{end}}</span>
<span class="time">{{.ModTime}}</span>
</a>
</li>
{{end}}{{end}}
After:
{{range .SubItemsHtml}}
<li class="{{.Type}}">
<a href="{{.Url}}">
<span class="name">{{.DisplayName}}</span>
<span class="size">{{.DisplaySize}}</span>
<span class="time">{{.DisplayTime}}</span>
</a>
</li>
{{end}}
Version 1.6.1
- feat: report unknown cli flag
- feat: add option --version
Version 1.6.0
Main changes
- feat(serverHandler): consider alias for directory index
Version 1.5.0
Main changes
- feat: add directory index page option
Version 1.4.2
Version 1.4.2 fix some known issues.