diff --git a/plupload.module b/plupload.module
index 9ea45de..f582844 100644
--- a/plupload.module
+++ b/plupload.module
@@ -127,6 +127,13 @@ function plupload_element_value(&$element, $input = FALSE, $form_state = NULL) {
         continue;
       }
 
+      // Transliterate filename if possible.
+      if ($key == 'name') {
+        if (module_exists('transliteration')) {
+          $value = transliteration_clean_filename($value);
+        }
+      }
+
       // Munge the submitted file names for security.
       //
       // Similar munging is normally done by file_save_upload(), but submit
@@ -188,11 +195,6 @@ function plupload_element_value(&$element, $input = FALSE, $form_state = NULL) {
         // temporary files in before trying to copy them.
         $files[$i]['tmppath'] = variable_get('plupload_temporary_uri', 'temporary://') . $value;
       }
-      elseif ($key == 'name') {
-        if (module_exists('transliteration')) {
-          $value = transliteration_clean_filename($value);
-        }
-      }
 
       // Store the final value in the array we will return.
       $files[$i][$key] = $value;
