don't save large attachments that sneak in
This commit is contained in:
parent
d2870d8207
commit
5d0fb4d41c
|
@ -180,6 +180,10 @@ func savedonk(url string, name, media string, localize bool) *Donk {
|
||||||
}
|
}
|
||||||
data = img.Data
|
data = img.Data
|
||||||
media = "image/" + img.Format
|
media = "image/" + img.Format
|
||||||
|
} else if len(data) > 100000 {
|
||||||
|
log.Printf("not saving large attachment")
|
||||||
|
localize = false
|
||||||
|
data = []byte{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
saveit:
|
saveit:
|
||||||
|
|
Loading…
Reference in New Issue