Commit c3b1c70398c581dff0525bf4237ebfa643834100

Authored by sergem
1 parent 02aa3d71

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) {
... ...