forked from grafana.jool/grafana-jool
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
272 B
14 lines
272 B
package thumbs
|
|
|
|
import (
|
|
"fmt"
|
|
"path/filepath"
|
|
)
|
|
|
|
func getFilePath(root string, req *previewRequest) string {
|
|
ext := "webp"
|
|
if req.Size != PreviewSizeThumb {
|
|
ext = "png"
|
|
}
|
|
return filepath.Join(root, fmt.Sprintf("%s-%s-%s.%s", req.UID, req.Size, req.Theme, ext))
|
|
}
|
|
|