Files
Watcharr/server/util/size.go
T
IRHM 4cc9bd3edb make image module way more robust
- Create a better (more) re-usable flow for downloading images to disk and inserting images into the db
- Validate images properly by reading them fully and using DecodeConfig
- Fix some security issues by re-encoding images
- Always outputs one format `jpeg`, which keeps everything "normalized" and adds compression to images (mainly user uploads which might be big).
2026-07-10 20:30:23 +00:00

8 lines
101 B
Go

package util
const (
Byte int64 = 1
Kibibyte int64 = 1024
Mebibyte int64 = 1024 * Kibibyte
)