Index: file.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/components/file.inc,v
retrieving revision 1.2.2.19.2.7
diff -u -r1.2.2.19.2.7 file.inc
--- file.inc	27 May 2008 16:11:46 -0000	1.2.2.19.2.7
+++ file.inc	31 May 2008 19:49:31 -0000
@@ -308,7 +308,7 @@
  */
 function theme_webform_mail_file($data, $component) {
   $file = unserialize($data);
-  $output = $component['name'] .": ". (!empty($file['filepath']) ? file_create_url($file['filepath']) : '') ."\n";
+  $output = $component['name'] .": ". (!empty($file['filepath']) ? webform_file_url($file['filepath']) : '') ."\n";
   return $output;
 }
 
@@ -334,7 +334,7 @@
     $form_item['#default_value'] = empty($filedata['filepath']) ? $filedata['error'] : $filedata['filepath'];
   }
   if ($filedata['filename']) {
-    $form_item['#suffix'] = ' <a href="'. file_create_url($filedata['filepath']) .'">Download '. $filedata['filename'] .'</a>' . $form_item['#suffix'];
+    $form_item['#suffix'] = ' <a href="'. webform_file_url($filedata['filepath']) .'">Download '. $filedata['filename'] .'</a>' . $form_item['#suffix'];
     if ($enabled) {
       $form_item['#description'] = t('Uploading a new file will replace the current file.');
       $form_item['#webform_current_file'] = $filedata;
@@ -451,3 +451,13 @@
   return empty($filedata['filename']) ? '\,' : $filedata['filename'] .'\,'. (int)($filedata['filesize']/1024);
 }
 
+/**
+ * Helper function to create proper URLs for uploaded files.
+ */
+function webform_file_url($filepath) {
+  if (!empty($filepath)) {
+    $info = pathinfo($filepath);
+    $file_url = file_create_url($info['dirname'] .'/'. rawurlencode($info['basename']));
+  }
+  return isset($file_url) ? $file_url : '';
+}
