diff --git a/lib/multi.c b/lib/multi.c
index fcef2e1..e6e72f9 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -403,6 +403,10 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
   data->state.conn_cache = &multi->conn_cache;
 
   data->state.infilesize = data->set.filesize;
+  if (data->state.infilesize == -1)
+  {
+    data->state.infilesize = data->set.postfieldsize;
+  }
 
   /* This adds the new entry at the 'end' of the doubly-linked circular
      list of SessionHandle structs to try and maintain a FIFO queue so

