Fixed decoding errors on upload
This commit is contained in:
parent
10335c9111
commit
5fad00dbe6
4
main.go
4
main.go
@ -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"
|
||||||
|
@ -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)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user