Commit 06f017badb64dd71318165467088cb966da1e829

Authored by sergem
Committed by jpbauer
1 parent 6ad0ca11

Added a random portion to the temporary filename in file uploads, since uploads …

…failed if more than one file happened to upload in the same second due to a naming conflict

Committed by: Serge Meunier
Reviewed by: Jarrett Jordaan
ktwebservice/KTUploadManager.inc.php
... ... @@ -201,7 +201,7 @@ class KTUploadManager
201 201 {
202 202 $filename=basename($filename);
203 203 $now=date('Y-m-d H:i:s');
204   - $now_str=date('YmdHis');
  204 + $now_str=date('YmdHis') + rand(0, 32768);
205 205  
206 206 // Ensure the temp directory exists otherwise an error is thrown.
207 207 if (realpath($this->temp_dir) == FALSE) {
... ...