mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-18 14:00:25 +00:00
Compare commits
No commits in common. "e423395ef0bcd106ddc7d460c055b95b5208415e" and "cc6db8398885ae4122bdd770ebe89c9a9a71ae62" have entirely different histories.
e423395ef0
...
cc6db83988
@ -2,13 +2,6 @@
|
|||||||
|
|
||||||
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": "最小密码长度",
|
"minimumPasswordLength": "Minimum password length",
|
||||||
"tusUploads": "分块上传",
|
"tusUploads": "分块上传",
|
||||||
"tusUploadsHelp": "File Browser 支持分块上传,在不佳的网络下也可进行高效、可靠、可续的文件上传",
|
"tusUploadsHelp": "File Browser 支持分块上传,在不佳的网络下也可进行高效、可靠、可续的文件上传",
|
||||||
"tusUploadsChunkSize": "分块上传大小,例如 10MB 或 1GB",
|
"tusUploadsChunkSize": "分块上传大小,例如 10MB 或 1GB",
|
||||||
|
@ -74,12 +74,7 @@ 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(
|
const sum = state.progress.reduce((acc, val) => +acc + +val, 0) as number;
|
||||||
(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,10 +124,7 @@ 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)
|
||||||
_, err := os.Stat(fPath)
|
if _, err := os.Stat(fPath); err == nil {
|
||||||
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