Uploading to a VMware ESX datastore using curl

Uploading from here to the DC is too slow. But downloading ISO images onto a server in the DC and then pushing them into the ESX servers works much better.
Note you can’t upload into the root directly for some reason, but uploading into a subfolder works fine.

curl -H "Expect:" -v --insecure --upload-file en_windows_server_2008_r2_standard_enterprise_datacenter_web_vl_build_x64_dvd_x15-59754.iso "https://USERNAME:PASSWORD@SERVER/folder/iso/en_windows_server_2008_r2_standard_enterprise_datacenter_web_vl_build_x64_dvd_x15-59754.iso?dcPath=ha%2ddatacenter&dsName=datastore1"