aboutsummaryrefslogtreecommitdiff
path: root/outboxPost.go
diff options
context:
space:
mode:
authorFChannel <>2021-07-25 13:49:05 -0700
committerFChannel <>2021-07-25 13:49:05 -0700
commit74b29610d09b05b3f563bb84e8ec65b534c2ee83 (patch)
tree7beb143edce67816fc6b3d7663df8e3960c750fb /outboxPost.go
parentdef81637bc3d9f7ff73fed2786dbaa7a78086799 (diff)
added modification to media ban
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)