Fixed decoding errors on upload

This commit is contained in:
Eduard Urbach 2018-03-03 00:04:54 +01:00
parent 10335c9111
commit 5fad00dbe6
2 changed files with 5 additions and 3 deletions

View File

@ -3,6 +3,10 @@ package main
import ( import (
"strings" "strings"
_ "image/gif"
_ "image/jpeg"
_ "image/png"
"github.com/aerogo/aero" "github.com/aerogo/aero"
"github.com/aerogo/session-store-nano" "github.com/aerogo/session-store-nano"
"github.com/animenotifier/arn" "github.com/animenotifier/arn"

View File

@ -45,9 +45,7 @@ function uploadImage(file: File) {
}, },
body: reader.result body: reader.result
}) })
console.log("Avatar upload finished!")
} }
reader.readAsBinaryString(file) reader.readAsArrayBuffer(file)
} }