From 3aeafecd7b547e3f535fb5a700fc20e590dab967 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 21 Mar 2004 20:07:14 +0000 Subject: [project @ 2004-03-21 20:07:14 by jmb] Broken in places. svn path=/import/netsurf/; revision=645 --- content/fetch.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'content') diff --git a/content/fetch.c b/content/fetch.c index a191a821c..d42489694 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -678,10 +678,18 @@ struct HttpPost *fetch_post_convert(struct form_successful_control *control) struct HttpPost *post = 0, *last = 0; for (; control; control = control->next) { - curl_formadd(&post, &last, - CURLFORM_COPYNAME, control->name, - CURLFORM_COPYCONTENTS, control->value, - CURLFORM_END); + if (control->file) { + curl_formadd(&post, &last, + CURLFORM_COPYNAME, control->name, + CURLFORM_FILE, control->value, + CURLFORM_END); + } + else { + curl_formadd(&post, &last, + CURLFORM_COPYNAME, control->name, + CURLFORM_COPYCONTENTS, control->value, + CURLFORM_END); + } } return post; -- cgit v1.2.3