Closed jkb0o closed 9 years ago
With StreamedWWWForm you can upload large files without loading them into memory.
var form = new HTTP.StreamedWWWForm(); form.AddField("name", "big_one.bundle"); form.AddFile("data", "bundles/big_one.bundle"); var request = new HTTP.Request("POST", "http://127.0.0.1:8888/upload", form); request.synchronous = true; request.Send(); HTTP.Response response = request.response; if (response.status == 200){ Debug.Log("Bundle " + name + " uploaded in " + (request.responseTime/1000f).ToString("F") + " seconds" ); } else { Debug.LogError("Error uploading bundle to server: [" + response.status + "] " + response.Text); }
With StreamedWWWForm you can upload large files without loading them into memory.