marjune
marjune
Then that will be too many negative options like --no-mkdir, --no-upload, etc. I thought about this problem before, but to keep the program simple, I didn't implement all the negative...
目前暂未支持,但是可以在自己的项目里添加认证功能,然后以中间件的方式调用ghfs,示例: https://github.com/mjpclab/use-ghfs-example/blob/main/use-as-middleware.go
Since basic auth data is stored in client side, the only way to clear the auth info is to send an "401 Unauthorized" status to client. This results client popup...
Version 1.18.1 shows logged in username.
They are just not contents from file system. I think the auth should just protect the file system files and dirs. And maybe not all dirs need auth. Dirs that...
For version 1.18.0, you could use: ``` ghfs --index "" --index-user :/upload:admin1:admin2:admin3 --upload /upload ... ```
I don't think ghfs hold connections. Maybe client side keep connection for some reason(e.g. for quick reconnect)? Then that's not ghfs's business. If you don't think so, please provide the...
Version 1.17.0 adds `--auth-user` and `--auth-dir-user` to restrict path access authentication to specified user. See [release notes](https://github.com/mjpclab/go-http-file-server/releases/tag/v1.17.0) for detail.
> 只能命令行上传啊,我想用前端js上传文件 可以的,用POST提交,详见API文档: https://github.com/mjpclab/go-http-file-server/blob/main/doc/zh-CN/api.md#%E5%9C%A8%E6%8C%87%E5%AE%9A%E8%B7%AF%E5%BE%84%E4%B8%8B%E5%88%9B%E5%BB%BA%E7%9B%AE%E5%BD%95
- 需要用 `--upload` 或 `--upload-dir` 选项指定可上传的目录 - `--auth` 后面指定的是URL路径,也就是实际出现在浏览器地址栏中的路径,所以应该用 `--auth /`。也可以用 `--auth-dir files`