Having a look through the code myself, the problem seems to be with the use of net/http.
passing in the io.Reader for the large file object as
provider_client.go:317: req, err := http.NewRequest(method, url, body)
provider_client.go:356: resp, err := client.HTTPClient.Do(req)
Causing a massive use of memory and the crash.
So presumably net/http is keeping the entire file read from the io.Reader in memory, possible more than once, causing a large image file to quickly eat up all the system resources.
Is there a way to chunk the upload data? (can data be streamed into net/http?)