mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-18 05:50:27 +00:00
Compare commits
4 Commits
cc6db83988
...
e423395ef0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e423395ef0 | ||
![]() |
65bbf44e3c | ||
![]() |
200b9a6c26 | ||
![]() |
3645b578cd |
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [2.36.3](https://github.com/filebrowser/filebrowser/compare/v2.36.2...v2.36.3) (2025-07-06)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* log error if branding file exists but cannot be loaded ([3645b57](https://github.com/filebrowser/filebrowser/commit/3645b578cddb9fc8f25a00e0153fb600ad1b9266))
|
||||||
|
|
||||||
### [2.36.2](https://github.com/filebrowser/filebrowser/compare/v2.36.1...v2.36.2) (2025-07-06)
|
### [2.36.2](https://github.com/filebrowser/filebrowser/compare/v2.36.1...v2.36.2) (2025-07-06)
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@
|
|||||||
"commandRunnerHelp": "你可以在此设置在下列事件中执行的命令。每行必须写一条命令。可以在命令中使用环境变量 {0} 和 {1},使 {0} 与 {1} 相关联。关于此功能和可用环境变量的更多信息,请阅读 {2}。",
|
"commandRunnerHelp": "你可以在此设置在下列事件中执行的命令。每行必须写一条命令。可以在命令中使用环境变量 {0} 和 {1},使 {0} 与 {1} 相关联。关于此功能和可用环境变量的更多信息,请阅读 {2}。",
|
||||||
"commandsUpdated": "命令已更新!",
|
"commandsUpdated": "命令已更新!",
|
||||||
"createUserDir": "在添加新用户的同时自动创建用户的主目录",
|
"createUserDir": "在添加新用户的同时自动创建用户的主目录",
|
||||||
"minimumPasswordLength": "Minimum password length",
|
"minimumPasswordLength": "最小密码长度",
|
||||||
"tusUploads": "分块上传",
|
"tusUploads": "分块上传",
|
||||||
"tusUploadsHelp": "File Browser 支持分块上传,在不佳的网络下也可进行高效、可靠、可续的文件上传",
|
"tusUploadsHelp": "File Browser 支持分块上传,在不佳的网络下也可进行高效、可靠、可续的文件上传",
|
||||||
"tusUploadsChunkSize": "分块上传大小,例如 10MB 或 1GB",
|
"tusUploadsChunkSize": "分块上传大小,例如 10MB 或 1GB",
|
||||||
|
@ -74,7 +74,12 @@ export const useUploadStore = defineStore("upload", {
|
|||||||
if (state.progress.length === 0 || state.sizes.length === 0) {
|
if (state.progress.length === 0 || state.sizes.length === 0) {
|
||||||
return "0 Bytes";
|
return "0 Bytes";
|
||||||
}
|
}
|
||||||
const sum = state.progress.reduce((acc, val) => +acc + +val, 0) as number;
|
const sum = state.progress.reduce(
|
||||||
|
(sum, p, i) =>
|
||||||
|
(sum as number) +
|
||||||
|
(typeof p === "number" ? p : p ? state.sizes[i] : 0),
|
||||||
|
0
|
||||||
|
) as number;
|
||||||
return formatSize(sum);
|
return formatSize(sum);
|
||||||
},
|
},
|
||||||
getTotalSize: (state) => {
|
getTotalSize: (state) => {
|
||||||
|
@ -124,7 +124,10 @@ func getStaticHandlers(store *storage.Storage, server *settings.Server, assetsFs
|
|||||||
if d.settings.Branding.Files != "" {
|
if d.settings.Branding.Files != "" {
|
||||||
if strings.HasPrefix(r.URL.Path, "img/") {
|
if strings.HasPrefix(r.URL.Path, "img/") {
|
||||||
fPath := filepath.Join(d.settings.Branding.Files, r.URL.Path)
|
fPath := filepath.Join(d.settings.Branding.Files, r.URL.Path)
|
||||||
if _, err := os.Stat(fPath); err == nil {
|
_, err := os.Stat(fPath)
|
||||||
|
if err != nil && !os.IsNotExist(err) {
|
||||||
|
log.Printf("could not load branding file override: %v", err)
|
||||||
|
} else if err == nil {
|
||||||
http.ServeFile(w, r, fPath)
|
http.ServeFile(w, r, fPath)
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user