diff --git a/server/php/upload.class.php b/server/php/upload.class.php
index <HASH>..<HASH> 100644
--- a/server/php/upload.class.php
+++ b/server/php/upload.class.php
@@ -1,6 +1,6 @@
 <?php
 /*
- * jQuery File Upload Plugin PHP Class 5.18.3
+ * jQuery File Upload Plugin PHP Class 5.18.4
  * https://github.com/blueimp/jQuery-File-Upload
  *
  * Copyright 2010, Sebastian Tschan
@@ -241,7 +241,7 @@ class UploadHandler
     protected function get_file_objects($iteration_method = 'get_file_object') {
         $upload_dir = $this->get_upload_path();
         if (!is_dir($upload_dir)) {
-            mkdir($upload_dir, $this->options['mkdir_mode']);
+            mkdir($upload_dir, $this->options['mkdir_mode'], true);
         }
         return array_values(array_filter(array_map(
             array($this, $iteration_method),
@@ -258,7 +258,7 @@ class UploadHandler
         if (!empty($version)) {
             $version_dir = $this->get_upload_path(null, $version);
             if (!is_dir($version_dir)) {
-                mkdir($version_dir, $this->options['mkdir_mode']);
+                mkdir($version_dir, $this->options['mkdir_mode'], true);
             }
             $new_file_path = $version_dir.'/'.$file_name;
         } else {
Allow recursive directory creation for all mkdir calls.