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