Fix mediaendpoint auth
parent
9a41fb90b9
commit
2136265825
|
@ -28,8 +28,8 @@ func HandleMedia(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
authCode := r.Header.Get("authorization")
|
authCode := r.Header.Get("authorization")
|
||||||
if formAuth := r.FormValue("authorization"); len(authCode) == 0 && len(formAuth) > 0 {
|
if formAuth := r.FormValue("access_token"); len(authCode) == 0 && len(formAuth) > 0 {
|
||||||
authCode = formAuth
|
authCode = "Bearer " + formAuth
|
||||||
}
|
}
|
||||||
if CheckAuthorization(authCode) {
|
if CheckAuthorization(authCode) {
|
||||||
file, header, err := r.FormFile("file")
|
file, header, err := r.FormFile("file")
|
||||||
|
|
Loading…
Reference in New Issue