Skip to content

Releases: mjpclab/go-http-file-server

Version 1.7.1

20 Apr 10:05
Compare
Choose a tag to compare

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

11 Apr 05:49
Compare
Choose a tag to compare

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

06 Apr 12:37
Compare
Choose a tag to compare
  • 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

28 Mar 06:32
Compare
Choose a tag to compare

fix(tpl): enable select pictures on iOS platform

Version 1.6.3

22 Mar 15:15
Compare
Choose a tag to compare

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

20 Mar 04:05
Compare
Choose a tag to compare

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

02 Mar 11:12
Compare
Choose a tag to compare
  • feat: report unknown cli flag
  • feat: add option --version

Version 1.6.0

24 Feb 15:16
Compare
Choose a tag to compare

Main changes

  • feat(serverHandler): consider alias for directory index

Version 1.5.0

24 Feb 11:42
Compare
Choose a tag to compare

Main changes

  • feat: add directory index page option

Version 1.4.2

20 Feb 17:11
Compare
Choose a tag to compare

Version 1.4.2 fix some known issues.