diff src/c/driver.c @ 739:4bb7e1c0550a

Only allow single-file upload per control
author Adam Chlipala <adamc@hcoop.net>
date Sat, 25 Apr 2009 14:35:49 -0400
parents d049d31a1966
children b302b6e35f93
line wrap: on
line diff
--- a/src/c/driver.c	Sat Apr 25 14:04:38 2009 -0400
+++ b/src/c/driver.c	Sat Apr 25 14:35:49 2009 -0400
@@ -393,14 +393,9 @@
             part += boundary_len;
 
             if (filename) {
-              uw_Basis_file *f = malloc(sizeof(uw_Basis_file));
-              uw_Basis_files fs = { 1, f };
+              uw_Basis_file f = {filename, {part_len, after_sub_headers}};
 
-              f->name = filename;
-              f->data.size = part_len;
-              f->data.data = after_sub_headers;
-
-              uw_set_file_input(ctx, name, fs);
+              uw_set_file_input(ctx, name, f);
             } else
               uw_set_input(ctx, name, after_sub_headers);
           }