aboutsummaryrefslogtreecommitdiff
path: root/outboxPost.go
diff options
context:
space:
mode:
Diffstat (limited to 'outboxPost.go')
-rw-r--r--outboxPost.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/outboxPost.go b/outboxPost.go
index 88b9927..6d23e23 100644
--- a/outboxPost.go
+++ b/outboxPost.go
@@ -637,8 +637,13 @@ func MakeActivityFollowingReq(w http.ResponseWriter, r *http.Request, activity A
func IsMediaBanned(db *sql.DB, f multipart.File) bool {
f.Seek(0, 0)
-
- fileBytes, _ := ioutil.ReadAll(f)
+
+ fileBytes := make([]byte, 2048)
+
+ _, err := f.Read(fileBytes)
+ if err != nil {
+ fmt.Println("error readin bytes for media ban")
+ }
hash := HashBytes(fileBytes)