Fix product performance grouped JSON build

This commit is contained in:
M_Kececi
2026-07-05 18:31:40 +03:00
parent 28e33d5e58
commit b2113a8d49
8 changed files with 1207 additions and 252 deletions
+25
View File
@@ -593,6 +593,23 @@ func resolveStoragePath(storagePath string) (string, []string) {
filepath.Join("..", "..", relImageThumb),
}
if u := extractImageUUID(raw, baseName); u != "" {
uFull := filepath.FromSlash(filepath.Join("uploads", "image", u+".jpg"))
uThumb := filepath.FromSlash(filepath.Join("uploads", "image", "t300", u+".jpg"))
candidates = append(candidates,
filepath.FromSlash(filepath.Join("image", u+".jpg")),
filepath.FromSlash(filepath.Join("image", "t300", u+".jpg")),
uFull,
uThumb,
filepath.Join(".", uFull),
filepath.Join(".", uThumb),
filepath.Join("..", uFull),
filepath.Join("..", uThumb),
filepath.Join("..", "..", uFull),
filepath.Join("..", "..", uThumb),
)
}
if root := strings.TrimSpace(os.Getenv("BLOB_ROOT")); root != "" {
candidates = append(candidates,
filepath.Join(root, raw),
@@ -601,6 +618,14 @@ func resolveStoragePath(storagePath string) (string, []string) {
filepath.Join(root, relImage),
filepath.Join(root, relImageThumb),
)
if u := extractImageUUID(raw, baseName); u != "" {
candidates = append(candidates,
filepath.Join(root, "uploads", "image", u+".jpg"),
filepath.Join(root, "uploads", "image", "t300", u+".jpg"),
filepath.Join(root, "image", u+".jpg"),
filepath.Join(root, "image", "t300", u+".jpg"),
)
}
}
for _, p := range candidates {