Sending image over UnityWebRequest

I am trying to send an image over to the server via Unity. I am able to achieve sending image via command prompt with the below code:

curl -H "Authorization: Token 555myToken555" -F "id=Image01" -F "image=@/home/example.png" https://mywebsite.com

But the same way I cannot achieve using Unity’s Web Request. Where do I provide the “id=Image01” and http link? Also is Put() better in performance than Post()?

public Texture2D tex;

UnityWebRequest unityWebRequest= UnityWebRequest.Put( tex,  texture.EncodeToPNG());

unityWebRequest.SetRequestHeader("Authorization", "Token 555myToken555");

unityWebRequest.SendWebRequest();

You’re sending the image bytes directly as the body of the request while curl creates a multipart/form-data body, encoding multiple fields.

To do the same with UnityWebRequest, you need to use WWWForm to set both an id and image field (see the first example on that page that uploads an image and sets an additional form field).