profile_picture.EncodeToPNG();
WWWForm form = new WWWForm();
form.AddBinaryData("file", bytes, profile_picture.name);
Debug.Log(profile_picture.name);
using (UnityWebRequest www = UnityWebRequest.Post("http://localhost:8000/auth/users/me/", form))
{
www.method = "PATCH";
www.SetRequestHeader("Content-Type", "application/json");
www.SetRequestHeader("Authorization", "Bearer " + Authenticator.jwtToken);
попробуй поменять тип контента на: Content-type: application/x-www-form-urlencoded
Обсуждают сегодня