Yes, this question has already been asked and answered here years ago.
My only problem that the answer doesn't match the reality. The FTP-connection should be reused, but it isn't. My curl version is 7.44.0 32/64 bit, OS: linux/AIX. Both verbose mode and tcpdump proves that a new connection is opened for every file-upload. Plus there is this part in url.c:
/*
* IsPipeliningPossible() returns TRUE if the options set would allow
* pipelining/multiplexing and the connection is using a HTTP protocol.
*/
static bool IsPipeliningPossible(const struct SessionHandle *handle,
const struct connectdata *conn)
/* If a HTTP protocol and pipelining is enabled */
if(conn->handler->protocol & PROTO_FAMILY_HTTP) {
which prevents FTP protocol from reusing the same connection.