This commit is contained in:
binwiederhier
2026-03-17 16:25:45 -04:00
parent a47d692cbf
commit cffa57950a
3 changed files with 23 additions and 6 deletions
+5 -5
View File
@@ -10,6 +10,11 @@ import (
"heckel.io/ntfy/v2/util"
)
var (
fileIDRegex = regexp.MustCompile(fmt.Sprintf(`^[-_A-Za-z0-9]{%d}$`, model.MessageIDLength))
errInvalidFileID = errors.New("invalid file ID")
)
// Store is an interface for storing and retrieving attachment files
type Store interface {
Write(id string, in io.Reader, limiters ...util.Limiter) (int64, error)
@@ -18,8 +23,3 @@ type Store interface {
Size() int64
Remaining() int64
}
var (
fileIDRegex = regexp.MustCompile(fmt.Sprintf(`^[-_A-Za-z0-9]{%d}$`, model.MessageIDLength))
errInvalidFileID = errors.New("invalid file ID")
)