Upload model c#

Hi, I am trying to implement API in Unity c# application. But I can not upload model.

    var byteArray = File.ReadAllBytes(Application.dataPath + "/StreamingAssets/colladaFile.dae");
    HttpContent fileStreamContent = new ByteArrayContent(byteArray);
    client.DefaultRequestHeaders.Add("Authorization", "Bearer " + responseDict["access_token"]);
    using (var formData = new MultipartFormDataContent())
    {
        formData.Add(new StringContent("name"), "name");
        formData.Add(new StringContent("description"), "description");
        formData.Add(new StringContent(""), "tags");
        formData.Add(new StringContent(""), "categories");
        formData.Add(new StringContent(""), "license");
        formData.Add(new StringContent("0"), "private");
        formData.Add(new StringContent(""), "password");
        formData.Add(new StringContent("0"), "isPublished");
        formData.Add(new StringContent("1"), "isInspectable");
        formData.Add(fileStreamContent, "modelFile");
        var response2 = await client.PostAsync("https://api.sketchfab.com/v3/models", formData);
        if (!response2.IsSuccessStatusCode)
        {
            Debug.Log("Error " + response2.IsSuccessStatusCode);
        }
        Debug.Log("Uploaded");
    }

I get an error:
“Socket exception: your application on the host-computer breaked out the connection.”

I’ve done this using Unity API.

StartCoroutine(PostRequest("https://api.sketchfab.com/v3/models"));

IEnumerator PostRequest(string url)
{
    List<IMultipartFormSection> formData = new List<IMultipartFormSection>();
    formData.Add(new MultipartFormDataSection("name","name"));
    formData.Add(new MultipartFormDataSection("isPublished", "false"));
    var byteArray = File.ReadAllBytes(Application.dataPath + "/StreamingAssets/collada.zip");
    formData.Add(new MultipartFormFileSection("modelFile", byteArray, "collada.zip", "application/json-patch+json"));
    UnityWebRequest uwr = UnityWebRequest.Post(url, formData);
    uwr.SetRequestHeader("Authorization", "Bearer " + token);
    yield return uwr.SendWebRequest();

    if (uwr.isNetworkError)
    {
        Debug.Log("Error While Sending: " + uwr.error);
    }
    else
    {
        Debug.Log("Received: " + uwr.downloadHandler.text);
    }
}

Hmm, @waleguene any idea?

You can also find our own Unity plugin here, which has an upload function: https://github.com/sketchfab/UnityGLTF

Thank you, James