--- modules/uploadpath/uploadpath.admin.inc.orig	Mon Sep  8 01:20:02 2008
+++ modules/uploadpath/uploadpath.admin.inc	Mon Dec 15 16:45:31 2008
@@ -21,6 +21,15 @@
     '#weight' => -6
   );
   
+  $form['misc']['uploadpath_lowercase_fullpath'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Lowercase full path'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('uploadpath_lowercase_fullpath', false),
+    '#description' => t('After file name  replacement has happened, lowercase the full path.'),
+    '#weight' => 0,
+  );
+  
   $form['misc']['uploadpath_clean_filenames'] = array(
     '#type' => 'checkbox',
     '#title' => t('Clean file upload filenames'),
--- modules/uploadpath/uploadpath.module.orig	Mon Sep  8 01:20:02 2008
+++ modules/uploadpath/uploadpath.module	Mon Dec 15 16:47:11 2008
@@ -67,6 +67,10 @@
               // apply new, prefixed file name by token replacing the path pattern
               $file_name = str_replace(array(' ', "\n", "\t"), '_', token_replace($pattern . '/', 'node', $node)) . $file['filename'];
             }
+
+	    if(variable_get('uploadpath_lowercase_fullpath', false)) {
+		$file_name = strtolower($file_name);
+	    }
             // SECURITY NOTE:
             // Tokens include user supplied information and could provide an attack vector.
             // The current method of creating directories prevents the use of .. or other malicious
